Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

perf: improve the indexing threshold for the fuse search engine #849

Merged
merged 1 commit into from
Feb 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ watch(
fuse = new Fuse(categories.value, {
keys: ["spec.displayName", "metadata.name"],
useExtendedSearch: true,
threshold: 0.2,
});
}
);
Expand Down
1 change: 1 addition & 0 deletions src/components/dropdown-selector/TagDropdownSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ watch(
fuse = new Fuse(tags.value, {
keys: ["spec.displayName", "metadata.name", "spec.email"],
useExtendedSearch: true,
threshold: 0.2,
});
}
);
Expand Down
1 change: 1 addition & 0 deletions src/components/dropdown-selector/UserDropdownSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ watch(
fuse = new Fuse(users.value, {
keys: ["spec.displayName", "metadata.name", "spec.email"],
useExtendedSearch: true,
threshold: 0.2,
});
}
);
Expand Down
1 change: 1 addition & 0 deletions src/components/global-search/GlobalSearchModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const selectedIndex = ref(0);
const fuse = new Fuse(searchableItem, {
keys: ["title", "group", "route.path", "route.name"],
useExtendedSearch: true,
threshold: 0.2,
});

const searchResults = computed((): SearchableItem[] => {
Expand Down
1 change: 1 addition & 0 deletions src/modules/system/roles/RoleList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ watch(
fuse = new Fuse(value, {
keys: ["spec.displayName", "metadata.name"],
useExtendedSearch: true,
threshold: 0.2,
});
}
);
Expand Down
1 change: 1 addition & 0 deletions src/modules/system/users/UserList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ const handleFetchUsers = async (options?: { mute?: boolean }) => {
fuse = new Fuse(data.items, {
keys: ["spec.displayName", "metadata.name", "spec.email"],
useExtendedSearch: true,
threshold: 0.2,
});

const deletedUsers = users.value.items.filter(
Expand Down