Hi,
Is there a way to do emulate paged search in Lucene? I can use the following
peace of code for returning the first page (10 items in each page), but
don't know how to navigate to the next page :-)

        IndexSearcher is = new ...
        ...
        TopFieldDocs tops = is.search(query, null /*filter*/, 10, 
Sort.RELEVANCE);
        for (int i = 0; i < tops.scoreDocs.length; i++) {
                ScoreDoc scoreDoc = tops.scoreDocs[i];
                System.out.println(is.doc(scoreDoc.doc));
        }

I can see that tops.totalHits, returns all matched documents. So is this
really "paged search", or I'm just doing a complete search and put a window
on the returned result each time?

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Emulating-Pages-Search-tf3500169.html#a9775141
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to