olivernn / lunr.js

A bit like Solr, but much smaller and not as bright
http://lunrjs.com
MIT License
8.87k stars 546 forks source link

Inconsistent results when using wildcard suffix? #486

Closed tpederson closed 3 years ago

tpederson commented 3 years ago

Say search text contains the word "foo" as well as "foo" followed by a period, ie. "foo.".

It seems that search("fo") returns both matches, but search("foo") only returns the match without the period at the end. Is this expected?

tpederson commented 3 years ago

I misunderstood the statement that the stemmer is disabled when doing wildcard searches. I guess that statement was meant to apply to wildcards that are NOT suffix. So I was able to "manually" remove the stemmer and get the auto-suggest behavior I wanted.