lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohsen Saboorian <mohs...@gmail.com>
Subject Emulating Pages Search
Date Sun, 01 Apr 2007 06:30:00 GMT

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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message