Closed adlerfaulkner closed 2 years ago
Hello!
For my use case I felt like the field-length norm factor was boosting short results too much compared to other longer yet still relevant results. I didn't want to turn field-length norm off completely so I added an option to tone down (or up) the field-length norm function.
The previous field-length norm function is 1/srqt(x)
where x is the number of words in the field. This PR changes that function to 1/x^(0.5*fieldNormWeight)
. fieldNormWeight
defaults to 1, making the functions equivalent. However, changing fieldNormWeight
to 0.5 produces a "smoother" curve, lessening the effects of field-length norm on the score of long fields.
This is excellent. Thanks!
mm had to do a manual merge. Closed by a9e00804497a1bfd7a94040520417825c085c945
Can you create a separate PR to add the necessary documentation? Thanks!
Yes, will get to that tomorrow :)
Add advanced config option fieldNormWeight to allow for customizability in how much field-length norm effects scores.