Closed Letrab closed 5 years ago
Looks good! How about calling it i.e. isPartialSearch
as true which set removeStemmer
as false and removeStopWordFilter
as false ? Would it be enough to cover that case in 100% ? I'd prefer personally if ItemsJS users / developers don't need to deal with lunr / search engine names complexity (tokenizer, stemmer, etc)
Good point! How about calling it isExactSearch
which defaults to false
(so it won't change existing code)? Setting it to true
removes both the stemming and the stopword filter?
(For me the name isPartialSearch
is a bit confusing of what is does exactly :-))
Cool, that makes sense to me
Done!
Great, merged and released new version on npm
Thanks!
I had issues with certain search queries where my expected results were not showing up. See attached testcase for this.
Apparently the stemmer could lead to unexpected results. Same goes for stopWords, filtered by the stopWordFilter, are filtered out when it would partially match your word you are searching for.
Added the options to be able to remove the stemmer and stopWordFilter for this. I chose for the addition of this configuration option to not break any existing functionality.