lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Binoy Dalal <>
Subject Re: Returned number of result rows as a function of maxScore or numFound.
Date Thu, 09 Jun 2016 05:26:39 GMT
I don't think you can do such a thing ootb with solr but this is pretty
easy to achieve using a custom search component.

Just write some custom code which will limit your resultset and plug it
into your request handler as the last component.

On Thu, 9 Jun 2016, 08:53 Prasanna Josium, <>

> Hi,
> I use a dse stack with has solr4.10.
> I want to control the number of rows from result set as a percent of the
> max hit 'numFound' or  'maxScore' for a query.
> e.g.,
> 1)  for a query 'foo', if I get 100 hits and if I want to get the top 5%
> percent (say rows=5%). Then I get only 5 rows.
> for a query 'bar', if I get 1000 hits, I want to get the top 5%
> (rows=5%).Then I get top 50 rows.
> 2) for a query 'foo' if the maxScore is 4.5, I want to get say all records
> within 10% of maxScore ..I want to get all records whose score is between
> 4.5 to 4.0(this could be the any number of records)
> in  other words, the returned set is a percent of hits, instead of a
> static row count.
> Is there a way to do this readily or via some custom implementation?
> Thanks
> Cheers
> Prasanna Josium
Binoy Dalal

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message