diff --git a/plugs/search/engine.ts b/plugs/search/engine.ts index 0e13e739..55d0b027 100644 --- a/plugs/search/engine.ts +++ b/plugs/search/engine.ts @@ -49,7 +49,9 @@ export class SimpleSearchEngine { const updateIndexMap = new Map(); const updateReverseIndexMap = new Map(); - const words = this.tokenize(document.text); + const pageContent = this.tokenize(document.text); + const pageName = this.tokenize(document.id); + const words = [...pageContent, ...pageName]; const filteredWords = this.removeStopWords(words); const stemmedWords = filteredWords.map((word) => this.stem(word));