Uwe,

> You are using TopDocs incorrectly. Normally you use *not* Integer.MAX_VALUE,
> as the upper bound of your pagination window as numer of documents. So if
> user wants to display documents 90 to 100, just set the number to 100 docs.
> If the user then goes to docs 100 to 110, just reexecute ther query with a
> larger value. [...] If somebody goes further, just raise and reexecute query.

That's what I thought of as workaround for the first pages. But at
some point the user might want to see the last page of the results,
so eventually I will have to call

  TopDocs topDocs = indexSearcher.search(query, null, 300500, sort);

and still run into an error. Right now I'd present the user with an
error message like "The search returned too many results, please further
restrict your search" but a more generic solution would sound a lot
better ;)

Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to