lunr.js icon indicating copy to clipboard operation
lunr.js copied to clipboard

Boosting results from only one field

Open martinsik opened this issue 2 years ago • 1 comments

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

martinsik avatar Apr 20 '22 19:04 martinsik

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

iproctor avatar Nov 13 '23 16:11 iproctor