We are attempting to perform a filtered search on two indices joined by a 
MultiSearcher.  Unfortunately, it appears there is an issue in the lucene code 
that is causing the filter to be simply reused at the starting ordinal for each 
individual index instead of being augmented by the starting document 
identifier.  We are hoping there is an alternate API that will allow us to 
perform a filtered search on multiple indices.

For example, we have two indices with three documents each, and a filter 
containing only doc ID 1.  When we perform a filtered search on a MultiSearcher 
that joins these two indices, we get two documents back (1, 4), where we were 
expecting only the one.  This is because the MultiSearcher, instead of starting 
at doc ID 3 for the second index, is interpreting the filter individually for 
each index.

We are using Lucene 3.0.2.  The API we see this behavior with is 
MultiSearcher.search(Query, Filter, nDocs) with a MatchAllDocsQuery and the 
filter code pasted below:

public class OpenBitSetFilter extends Filter {

    private OpenBitSet openBitSet;


    public OpenBitSetFilter(OpenBitSet openBitSet) {
        this.openBitSet = openBitSet;
    }

    public DocIdSet getDocIdSet(IndexReader indexReader) throws IOException {
        return openBitSet;
    }

}


Reply via email to