Previously a single term could be passed to the Query#term method,
additionally this term needed to be a string. No tokenization is
performed by this method. The API was a bit cumbersome when dealing
with user entered queries, tokenization had to be done manually, and
then the results manually iterated over and used with Query#term.
This change improves matters in two ways:
Lists of terms are supported
A term can be anything that responds to toString
Together these two changes make it possible to directly use the
lunr.tokenizer when passing strings to Query#term.
Previously a single term could be passed to the Query#term method, additionally this term needed to be a string. No tokenization is performed by this method. The API was a bit cumbersome when dealing with user entered queries, tokenization had to be done manually, and then the results manually iterated over and used with Query#term.
This change improves matters in two ways:
toString
Together these two changes make it possible to directly use the lunr.tokenizer when passing strings to Query#term.