: We have implemented a custom scoring function and also need to limit the : results by score. How could we go about that? Alternatively, can we : suppress the results early using some kind of custom filter?
in general, limiting by score is a bad idea for all of the reasons outlined here... https://wiki.apache.org/lucene-java/ScoresAsPercentages ...if you have defined a custom scoring function, then many of those issues may not apply, and you can use the frange parser to filter documents which do not have a "score" in a given range... https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-FunctionRangeQueryParser How exactly you use frange with your "custom score" depends on how you implement it -- if ou implemented it directly as a ValueSource (w/ a ValueSourceParser) then you can just call that function directly. If you've implemented it as a custom similarity on regular query structures, you can still use frange and just wrap your query using the "query()" function. Eithe way, you can use the frange parser as part of a filter query to limit the results based on the score of your function -- independent of what your main query / sort are. if, in the later case, you want to match & sort documents based on the same query, you can still do that using local params to refer to the query in both places... q=your_custom_query&sort=score desc&fq={!frange l=90}query($q) -Hoss http://www.lucidworks.com/