Controlling Solr score/sort
Posted
by Znarkus
on Stack Overflow
See other posts from Stack Overflow
or by Znarkus
Published on 2010-06-10T06:59:42Z
Indexed on
2010/06/10
7:02 UTC
Read the original article
Hit count: 258
I want to filter a property within a range, but items that does not have the property should come last in the result. My solution was to set it to -1
if the property was not set.
+(property:[10000000001 TO 10000000019] property:"-1"^0.5)
This doesn't work, since every document with property:-1 get a very high score, for some reason. Is there a way to reliably control the sorting here?
Boosting the range instead would mean I must boost every other term, which I'd rather not do.
© Stack Overflow or respective owner