lengthNorm
is one of the three factors going into calculating the norm for a field.
In elastic search, one can turn off field normals with "omit_norms" : true
Unfortunately, this causes no index-time boost to be applied when querying against such fields.
Is there some way to strictly turn off the calculation of lengthNorm
?
I need field-level index-time boost, but I really need the length of the field not to matter.
Reference
The lengthNorm and field level boosting, as you said, are both stored in the norm
. So no, you can't have one without the other.
But you don't actually need field boosting at index time. You can apply it at search time instead, and that way you have more flexibility when you want to tweak the boost level later on.
Not only that, by setting omit_norms
you reduce the amount of data you have to store at index time by quite a lot, so it is to be recommended where appropriate (such as in your case).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With