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

Query#term called with tokens array and options only last token is used #354

Closed mike1808 closed 6 years ago

mike1808 commented 6 years ago

When initializing query with the output of lunr.tokenizer the search is performed only for the last token.

Fiddle

The issue is in lunr.Query.prototype.term where the same options object is reused for each clause.