olivernn / lunr.js

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

Boosting results from only one field #513

Open martinsik opened 2 years ago

martinsik commented 2 years ago

I'm playing with the example implementation here and I'd expect that when I enter name:john^1000000 body:john it will prioritize results where the word "john" is in its title. But that's not what's happening. The first result is "Charles Duke" and then "John Young" which is not what I'd expect. It looks like the boost has no effect.

Screenshot 2022-04-20 210129

iproctor commented 7 months ago

for posterity, I had the same issue and determined it was because boosts are relative to terms for the same field only