On 30 June 2014 at 09:28:47, Andrej Golcov ([email protected]) wrote:

Hi Antonia, 

> Also, you might have noticed I called the paginate(rows=20000) method on the 
> query chain (in the bhsolr.solr_backend query() method). By default, Solr 
> fetches only 10 documents when a query has been made. And there is no way for 
> fetching all query results [1]. I was thinking of a reasonable solution, but 
> I would like your opinion on this matter: 
> 
> So, a solution for this would be to specify a maximum number of results to be 
> retrieved. And the number should be as close as possible to the number of 
> documents stored in the index. So I could keep track of how many documents 
> were added to the index, and update the ‘rows’ parameter every time the 
> number changes. 
> Another solution would be to make multiple smaller queries (with the ‘rows’ 
> parameter set to the max number of results per page) until all results have 
> been fetched. 
> How should I proceed in implementing this? 

Why would do you want to get all found results from Solr? That could 
be a real performance issue. 
If you need only count, Solr returns found items count in its 
response: 
https://cwiki.apache.org/confluence/display/solr/Pagination+of+Results 
Then I guess my second suggestion is more suitable, isn’t it? The Whoosh 
implementation follows this pattern as well, from what I saw. 




Cheers, Andrej 

Reply via email to