Skip to content

Commit

Permalink
Add useExtendedSearch to Fuse.js search
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiodxa committed Jun 16, 2024
1 parent b47b3dd commit c1e8854
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/models/article.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export class Article extends Post<ArticleMeta> {
keys: ["title", "content"],
includeScore: true,
findAllMatches: false,
useExtendedSearch: true,
});

return fuse.search(query);
Expand Down
1 change: 1 addition & 0 deletions app/models/glossary.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export class Glossary extends Post<GlossaryMeta> {
keys: ["term", "title", "definition"],
includeScore: true,
findAllMatches: false,
useExtendedSearch: true,
});

return fuse.search(trimmedQuery);
Expand Down
1 change: 1 addition & 0 deletions app/models/like.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export class Like extends Post<LikeMeta> {
keys: ["title"],
includeScore: true,
findAllMatches: false,
useExtendedSearch: true,
});

return fuse.search(trimmedQuery);
Expand Down
1 change: 1 addition & 0 deletions app/models/tutorial.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export class Tutorial extends Post<TutorialMeta> {
keys: ["title", "content"],
includeScore: true,
findAllMatches: false,
useExtendedSearch: true,
});

return fuse.search(query);
Expand Down

0 comments on commit c1e8854

Please sign in to comment.