We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c186d75 + 3c19937 commit 0ec7ff5Copy full SHA for 0ec7ff5
1 file changed
src/ui/search.tsx
@@ -63,6 +63,18 @@ export function Search() {
63
mode: "fulltext",
64
});
65
if (!result) return {};
66
+
67
+ const seen: Record<string, boolean> = {};
68
+ result.hits = result.hits.filter(
69
+ hit => {
70
+ hit.document.path = hit.document.path.replace("/index#", "#");
71
+ if(!seen[hit.document.path]) {
72
+ seen[hit.document.path] = true;
73
+ return hit;
74
+ }
75
76
+ );
77
78
const groupedHits = result.hits.reduce(
79
(groupedHits, hit) => {
80
const section = hit.document.section.replace(
0 commit comments