Re: Paging in a Lucene search

2009-08-06 Thread Shai Erera
If you pass reader.maxDoc(), it will create a heap (array) of size reader.maxDoc() and is not recommended. Instead, if you display the first page of results, you should pass 10 (assuming you display 10 results). You can call TopFieldDocs.totalHits to get the total number of matching results. Then

Paging in a Lucene search

2009-08-06 Thread Savvas-Andreas Moysidis
Hello, I'd like to ask if anybody has any thoughts on the best strategy to use when implementing a paging scenario in a Lucene search. In order to implement my paging list before the view is rendered I need to know the total number of documents this particular search would return but I still need