lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Earl Hood <>
Subject Restricting search results to a dynamic slice of documents
Date Fri, 04 May 2012 18:51:18 GMT
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

    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,


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

View raw message