From 4915297f014b1e8ff9d6ff97b8a70d5d3d9707fe Mon Sep 17 00:00:00 2001 From: Alexandra <45508320+alexankitty@users.noreply.github.com> Date: Fri, 18 Oct 2024 02:20:41 -0600 Subject: [PATCH] fix a couple issues with the search that caused a load failure with the new file list change --- lib/search.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/search.js b/lib/search.js index d4c7756..64d941f 100644 --- a/lib/search.js +++ b/lib/search.js @@ -9,11 +9,7 @@ export default class Searcher{ findAllMatches(query){ var startTime = process.hrtime(); - let results = this.miniSearch.search(query, { - filter: (result) => { - return result.score >= this.minMatch - } - }) + let results = this.miniSearch.search(query) var elapsed = this.parseHrtimeToSeconds(process.hrtime(startTime)); return { items: results, @@ -23,7 +19,7 @@ export default class Searcher{ createIndex(fileArr){ this.miniSearch = new MiniSearch({ - fields: ['name', 'category', 'type'], + fields: ['filename', 'category', 'type'], storeFields: ['filename', 'category', 'type', 'date', 'size', 'region', 'path'], searchOptions: { boost: { name: 2 },