lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus Falck" <>
Subject SV: GetMoreDocs question
Date Fri, 01 Sep 2006 08:10:58 GMT
Thx Hoss.

But why do I have to reterive atleast 1 document when im using the TopDocs ?
(If I set nDoc to 0 it will throw an exception).


-----Ursprungligt meddelande-----
Från: Chris Hostetter [] 
Skickat: den 31 augusti 2006 20:09
Ämne: Re: GetMoreDocs question

: I have some questions regarding the GetMoreDocs(50) call in the
: constructors of the Hits class.

: First off whats the purposes of this call?

Hits is designed to meet the simple needs of simple clients -- the
assumption is that clients using Hits want simple paginated results - so
Hits goes ahead and gets you page#1.

: Can I do something so I don't cache up 100 docs when I'm just asking for
: a count?

This is what the search method that returns TopDocs is designed for --
when all you care about is the totalHits and the first N docs (in your
case N is 0 or maybe 1)


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message