0

Now we use Solr 4.0 for our search platform. When we input a keyword for searching, and there are too many results returned. We want use a threshold of document score to discard those results whose scores are less than the threshold.

But we can't find how to implement it, may you kind to help us for this problem.

Gergo Erdosi
  • 40,904
  • 21
  • 118
  • 94
whlgh
  • 1
  • 1
    Although the better solution is to [NOT do this](http://wiki.apache.org/lucene-java/ScoresAsPercentages). I've implemented this sort of behavior once, and it's frustrating to everyone, especially users (results are cut off before the one they are looking for, because your scoring cutoff didn't take into account their query's score distribution, and the user often has NO idea why). Even if you simply cut off at a hard number of results, at least the user would understand why their result is missing, and will have an idea at a solution (refine the query). – femtoRgon Jun 07 '13 at 16:24

1 Answers1

0

The default behaviour of Solr is to order by relevancy score .

How would you definer what the score threshold is? This could change over time.

Instead you could set the number of rows parameter to only return 50 results for example (by default it is 10)