lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Howard <natehowa...@gmail.com>
Subject Hits and TopDoc
Date Tue, 20 Oct 2009 21:03:29 GMT
This is sort of related to the above question, but I'm trying to update some
(now depricated) Java/Lucene code that I've become aware of once we started
using 2.4.1 (we were previously using 2.3.2):

Hits results = MultiSearcher.search(Query));

int start = currentPage * resultsPerPage;
int stop = (currentPage + 1) * resultsPerPage();

for(int x = start; (x < searchResults.length()) && (x < stop); x++)
{
    Document doc = searchResults.doc(x);
    // do search post-processing with the Document
}

Results per page is normally small (10ish or so).

I'm having difficulty figuring out how to get TopDocs to replicate this
paging functionality (which the application must maintain).

Thanks in advance!

Nathan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message