On 4/27/06, Jean Sini <[EMAIL PROTECTED]> wrote:
> We were unable to find Searcher methods that would return, say, 'n'
> (typically, 10) hits after a start offset 'k'.

Yes, that's because to find results k through k+n, Lucene must first
find results 0 through k+n.

> So we're currently using the Hits collection returned by Searcher.search,
> and using its Hits.doc(i) method to get the ith hit, with i between k and
> k+n. Is that the most efficient way to do that?

You can use the lower level search functions that return TopDocs or
TopFieldDocs to get more explicit control over "n", when you search
for the top "n" documents.

-Yonik
http://incubator.apache.org/solr Solr, the open-source Lucene search server

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

Reply via email to