Hi Stefan,

you are right. I noticed this page-based result handling too. For web pages it 
is handy to maintain a number-of-results-per-page parameter together with an 
offset to browse result pages. Both can be done be solr's 'start' and 'rows' 
parameters.
But as I don't use Solr in a web context it's important for me to get all 
results in one go.

While waiting for answers I was working on a work-around and came across the 
LukeRequestHandler (http://wiki.apache.org/solr/LukeRequestHandler). It allows 
to query the index and obtain meta information about it. I found a parameter in 
the response called 'numDocs' which seams to contain the current number of 
index rows.

So I was now thinking about first asking for the number of index rows via the 
LukeRequestHandler and then setting the 'rows' parameter to this value. 
Apparently, this is quite expensive as one front-end query always leads to two 
back-end queries. So I'm still searching for a better way to do this!

Cheers,
Egon



-------- Original-Nachricht --------
> Datum: Wed, 10 Feb 2010 13:19:05 +0000
> Von: stefan.ma...@bt.com
> An: solr-user@lucene.apache.org
> Betreff: RE: How to not limit maximum number of documents?

> I was just thinking along similar lines
> 
> As far as I can tell you can use the parameters start & rows in
> combination to control the retrieval of query results
> 
> So
> http://<host>:<port>/solr/select/?q=<query>
> Will retrieve up to results 1..10
> 
> http://<host>:<port>/solr/select/?q=<query>&start=11&rows=10
> Will retrieve up results 11..20
> 
> So it is up to your application to control result traversal/pagination
> 
> 
> Question - does this mean that 
> http://<host>:<port>/solr/select/?q=<query>&start=11&rows=10
> Runs the query a 2nd time
> 
> And so on
> 
> 
> Regards
> Stefan Maric 

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

Reply via email to