Skip to content

Commit

Permalink
Remove fuzzyness from all fuse queries
Browse files Browse the repository at this point in the history
  • Loading branch information
lookacat committed Feb 27, 2023
1 parent c080ddd commit 215a29b
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default defineComponent({
const fuse = new Fuse(items, {
...(props.label && { keys: [props.label] }),
shouldSort: true,
threshold: 0.2,
threshold: 0.0,
location: 0,
distance: 100,
minMatchCharLength: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export default defineComponent({
const groupsSearchEngine = new Fuse(groups, {
includeScore: true,
useExtendedSearch: true,
threshold: 0.3,
threshold: 0.0,
keys: ['displayName']
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default defineComponent({
const searchEngine = new Fuse(collection, {
includeScore: true,
useExtendedSearch: true,
threshold: 0.3,
threshold: 0.0,
keys: ['displayName']
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export default defineComponent({
const searchEngine = new Fuse(spaces, {
includeScore: true,
useExtendedSearch: true,
threshold: 0.3,
threshold: 0.0,
keys: ['name']
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export default defineComponent({
const usersSearchEngine = new Fuse(users, {
includeScore: true,
useExtendedSearch: true,
threshold: 0.3,
threshold: 0.0,
keys: ['displayName', 'mail', 'onPremisesSamAccountName', 'role.displayName']
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default defineComponent({
const searchEngine = new Fuse(collection, {
includeScore: true,
useExtendedSearch: true,
threshold: 0.3,
threshold: 0.0,
keys: ['collaborator.displayName', 'collaborator.name']
})
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-files/src/helpers/resource/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const filterResources = (resources: unknown[], term: string, limit?: numb
const engine = new Fuse(resources, {
includeScore: true,
useExtendedSearch: true,
threshold: 0.3,
threshold: 0.0,
keys: ['name', 'type', 'icon', 'extension', 'tags']
})

Expand Down
2 changes: 1 addition & 1 deletion packages/web-pkg/src/components/ItemFilter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export default defineComponent({
const usersSearchEngine = new Fuse(items, {
includeScore: true,
useExtendedSearch: true,
threshold: 0.3,
threshold: 0.0,
keys: props.filterableAttributes as any
})
Expand Down

0 comments on commit 215a29b

Please sign in to comment.