>From memory: there are different methods in SolrIndexSearcher for reason. It
>has to do with paging and sorting. Whenever you sort on a simple field, you
>can easily start at a specific offset. The problem with sorting on score, is
>that score has to be calculated for all documents matching query. This means
>that deep paging is a problem, which it is.
-----Original message-----
> From:Biyyala, Shishir (Contractor) <shishir_biyy...@cable.comcast.com>
> Sent: Monday 2nd February 2015 22:22
> To: solr-user@lucene.apache.org
> Cc: java-u...@lucene.apache.org
> Subject: Question regarding SolrIndexSearcher implementation
>
> Hello,
>
> I did not know what the right mailing list would be (java-user vs solr-user),
> so mailing both.
>
> My group uses solr/lucene, and we have custom collectors.
>
> I stumbled upon the implementation of SolrIndexSearcher.java and saw this :
>
> https://github.com/apache/lucene-solr/blob/trunk/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
> (line 1676)
>
> " TopDocs topDocs = topCollector.topDocs(0, len);" the topDocs "start" value
> is always being hardcoded to 0;
>
> What that is leading to is creating of excessive topDocs that the application
> actually needs; My application can potentially be faced with deep pagination
> and we do not use queryresults cache.
>
> If I request for 200-250 docs,
>
> I was expecting start=199, howMany=51;
> But turns out that start=0 (always) and howMany=250
>
> Any reasons why start value is hardcoded to 0? Please suggest. It is
> potentially impacting performance of our application.
>
> Thanks much,
> Shishir