olivernn / lunr.js

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

Succeeding wildcard #454

Closed simon21587 closed 4 years ago

simon21587 commented 4 years ago

Why does "foo" not match "foo" while "*foo" and "fo*" does? I'd like to prepend and append the wildcard to each term, e.g. "*foo* *bar\", by default, but then a search for "foo bar" does not return any results, while "fo ba" does.

Edit: Never mind. It was the stemmer that caused this strange behaviour for some words. After disabling the stemmer (https://github.com/olivernn/lunr.js/issues/212) everything worked perfectly fine.