search - How can I exclude scores that equal 0 in a Solr function query and maintain the actual score? -
search - How can I exclude scores that equal 0 in a Solr function query and maintain the actual score? -
my goal round score grouping similar items , sort field (let's utilize cost example).
i'm able accomplish next query:
/select?deftype=func&q=rint(product(query({!v=the search term}),100))&fl=score,price&sort=score%20desc,price
however, query returns every document indexed in solr.
how can filter query items score of 0 excluded?
i've tried adding {!frange l=1} query kind of worked... made of scores equal 1. isn't because need show relevant results first.
thanks in advance help.
alex
i spent hours trying filter out values relevance score of 0. couldn't find straight forwards way this. ended accomplishing workaround assigns query function local param. phone call local param in both query ("q="
) , filter query ("fq="
).
let's have query like:
q={!func}sum(*your arguments*)
first, create function component own parameter:
q={!func}$localparam &localparam={!func}sum(*your arguments*)
now homecoming results scores between 1 , 10 add together filter query on localparam:
q={!func}$localparam &localparam={!func}sum(*your arguments*) &fq={!frange l=1 u=10 inclusive=true}$localparam
search solr
Comments
Post a Comment