Limit number of results by Max Score's 80% and above(Please Check Body) in SOLR

393 Views Asked by At

Lets say my MaxScore is 500.

Then I want results with 500's 80% and above Score results only .

How can I achieve that?

2

There are 2 best solutions below

0
On

I would suggest to use _score as sorting by descending order and apply the limits by using start and rows.

?q=test&&start=0&rows=10&fl=_score

The other option is to use the function range query parser by reading the documentation provided at solr function range query

for example :

1. {!frange l=400 u=500}nameOfField

2. ​fq={!frange l=400 u=500} sum(field1,field2)
1
On

Function range query parser is the better way. If you use facets you get the right result count of facets.

This example is meant to be supplementary if edismax is used as defType fq={!frange l=400}query({!edismax v=$q})