Revert "Add custom sort function to improve search matching (#574)" (#578)

This reverts commit 77ba201367.
This commit is contained in:
Chenlei Hu
2024-08-21 14:25:20 -04:00
committed by GitHub
parent 71fa71e82c
commit f2de9b0d3c

View File

@@ -121,13 +121,7 @@ export class NodeSearchService {
includeScore: true,
threshold: 0.3,
shouldSort: true,
useExtendedSearch: true,
// Sort by score first, then by length of the display name, then by index
// https://github.com/Comfy-Org/ComfyUI_frontend/issues/562#issuecomment-2299738393
sortFn: (a, b) =>
Math.abs(a.score - b.score) > 0.01
? a.score - b.score
: a.item[1]['v']['length'] - b.item[1]['v']['length'] || a.idx - b.idx
useExtendedSearch: true
})
const filterSearchOptions = {