lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: Restricting search results to a dynamic slice of documents
Date Sat, 05 May 2012 16:38:52 GMT
On the face of it, it looks like one of the subclasss of
should be what you're looking for. Or is the "dynamic slice" something
you couldn't formulate into a query?


On Fri, May 4, 2012 at 2:51 PM, Earl Hood <> wrote:
> I require the ability to perform a search on a dynamic slice of documents in
> an index.  For a given event, only a select set of documents should be
> considered when performing a query.
> Looking at the API, it appears that I can use a Collector during the search
> to filter out any documents that do not match the current allowed set.
> However, the API docs state the following about the collect() method of
> Collector:
>    Note: This is called in an inner search loop. For good search
>    performance, implementations of this method should not call
>    Searcher.doc(int) or IndexReader.document(int) on every hit. Doing so
>    can slow searches by an order of magnitude or more.
> Unfortunately, it appears I need to use such methods since I will need to
> access the specific document fields to determine if the document is part of
> the allowable search set.
> Is the performance hit considerable?
> I noticed some information about term caching and filtering, but I'm a bit
> fuzzy on how to exactly use it and if it is applicable to what I'm trying
> to do.
> Any help is appreciated,
> --ewh
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message