See below...

On 8/31/06, Marcus Falck <[EMAIL PROTECTED]> wrote:

Hi,



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


What constructors? I just get a Hits object returned from the Searcher. Or
are you looking in the source?


First off whats the purposes of this call?


I'll pass on this since I don't know.


Why do I have to make this call if I only want to get out a count of the
matching documents and don't want to reterive any document from the
index?


You don't. Just look at the Hits.length()


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


Why do you care? Is this a demonstrable performance issue? Premature
optimization and all that...

I don't know any way of getting around this, but since this hasn't been a
performance issue for me, I haven't
looked very hard.

And I assume you're counting the results of a query, in which case getting
around the cached documents sounds like way more work than it's worth.

If you're asking how many documents are in the index, that's another issue.
One technique I've used is to keep a "statistics document" in the index with
fields orthogonal to the fields in my "regular" documents (so no queries
match) with summary statistics that I assemble while making the index. Then,
when I want meta-information, I can just query that specific document and
read it.

Best
Erick


/

Regards

Marcus



Reply via email to