Commit 03ae540
committed
Improve search results
There were a few different cases where I wanted to improve search
results.
1. I wanted to include stop words. Searching for stop words could be
useful for language learners. There was also an issue where the query
included stop words, but the search index didn't, so if your query
had any stop words then it would return no matches.
2. I wanted to be able to wildcard match partial words where the partial
word is longer than the stemmed word. e.g. "redunda*" matching
"redundant" (which is stemmed to "redund").
To solve these problems I made a few changes:
1. I no longer applied the stop word filter to the index.
2. I applied stemmer to the index, but also left the original words in
for wildcard matches that don't also match the stemmed word.
3. I now trim queries but not if they contain a *.1 parent 19535a3 commit 03ae540
File tree
6 files changed
+19177
-9576
lines changed- dist
- lib
- test
6 files changed
+19177
-9576
lines changed
0 commit comments