olivernn / lunr.js

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

Proximity search while searching for multiple words #439

Open rajasekharmekala opened 4 years ago

rajasekharmekala commented 4 years ago

Hi, I see that lunr uses BM25 algorithm for scoring which is independent of the proximity of words in the document. But while searching for multiple words, is their proximity taken into account? i.e, if I search for "integration test", would the ranking algorithm consider how close the two words are located in the document? If not, how can I achieve this while querying? Is it the only scoring algorithm supported by lunr?

olivernn commented 4 years ago

Lunr does not currently take into account the proximity of words. This is something that I would like to eventually support but I can't provide any timeline as to when that feature would be supported.