lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Willnauer <>
Subject Re: Using HitCollector to Collect First N Hits
Date Sat, 22 Aug 2009 12:34:27 GMT
Hi Len,
what kind of query do you execute when you collect the hits.
HitCollector should be called for each document by the time it is
scored. Is it possible that you run a query that could be expensive in
terms of term expansion like WildcardQuery?


On Sat, Aug 22, 2009 at 7:09 AM, Len Takeuchi<> wrote:
> Hello,
> I’m using Lucene 2.4.1 and I’m trying to use a custom HitCollector to collect
> only the first N hits (not the best hits) for performance.  I saw another
> e-mail in this group where they mentioned writing a HitCollector which throws
> an exception after N hits to do this.  So I tried this approach and it seems
> as if my HitCollector isn’t called until the hits have been determined, i.e.
> the time until my HitCollector is called is dependent on the number of hits
> and my performance is no better than when I was not using a custom
> HitCollector.  Does anyone have insight into my problem?  The person who tried
> approach mentioned performance improved significantly for him.
> Regards,
> Len
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message