olivernn / lunr.js

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

Term presence mixed with fuzzy search on more than one keyword throws QueryParseError: Unexpected lexeme type 'PRESENCE' #369

Closed mtdjr closed 6 years ago

mtdjr commented 6 years ago
screen shot 2018-08-14 at 10 08 10 pm
mtdjr commented 6 years ago

Looks like if the fuzzy search comes last, there isn't an issue.

screen shot 2018-08-15 at 12 35 40 pm
olivernn commented 6 years ago

Thanks for taking the time to report this. It turns out the bug affected both terms with edit distance and terms with a boost. To trigger it required a term with either edit distance or boost, followed by a term with a presence.

I've put together a fix and cut a new release 2.3.2.

mtdjr commented 6 years ago

Awesome! Thank you!