mirror of
https://github.com/alexankitty/Myrient-Search-Engine.git
synced 2026-01-15 16:33:15 -03:00
fix a couple issues with the search that caused a load failure with the new file list change
This commit is contained in:
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user