Package org.apache.solr.search
Class BitsFilteredDocIdSet
- java.lang.Object
-
- org.apache.lucene.search.DocIdSet
-
- org.apache.solr.search.FilteredDocIdSet
-
- org.apache.solr.search.BitsFilteredDocIdSet
-
- All Implemented Interfaces:
org.apache.lucene.util.Accountable
public final class BitsFilteredDocIdSet extends FilteredDocIdSet
This implementation supplies a filtered DocIdSet, that excludes all docids which are not in a Bits instance. This is especially useful inFilterto apply theacceptDocspassed togetDocIdSet()before returning the final DocIdSet.- See Also:
DocIdSet,Filter
-
-
Constructor Summary
Constructors Constructor Description BitsFilteredDocIdSet(org.apache.lucene.search.DocIdSet innerSet, org.apache.lucene.util.Bits acceptDocs)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanmatch(int docid)Validation method to determine whether a docid should be in the result set.static org.apache.lucene.search.DocIdSetwrap(org.apache.lucene.search.DocIdSet set, org.apache.lucene.util.Bits acceptDocs)Convenience wrapper method: IfacceptDocs == nullit returns the original set without wrapping.-
Methods inherited from class org.apache.solr.search.FilteredDocIdSet
bits, getChildResources, getDelegate, iterator, ramBytesUsed
-
-
-
-
Constructor Detail
-
BitsFilteredDocIdSet
public BitsFilteredDocIdSet(org.apache.lucene.search.DocIdSet innerSet, org.apache.lucene.util.Bits acceptDocs)Constructor.- Parameters:
innerSet- Underlying DocIdSetacceptDocs- Allowed docs, all docids not in this set will not be returned by this DocIdSet
-
-
Method Detail
-
wrap
public static org.apache.lucene.search.DocIdSet wrap(org.apache.lucene.search.DocIdSet set, org.apache.lucene.util.Bits acceptDocs)Convenience wrapper method: IfacceptDocs == nullit returns the original set without wrapping.- Parameters:
set- Underlying DocIdSet. Ifnull, this method returnsnullacceptDocs- Allowed docs, all docids not in this set will not be returned by this DocIdSet. Ifnull, this method returns the original set without wrapping.
-
match
protected boolean match(int docid)
Description copied from class:FilteredDocIdSetValidation method to determine whether a docid should be in the result set.- Specified by:
matchin classFilteredDocIdSet- Parameters:
docid- docid to be tested- Returns:
- true if input docid should be in the result set, false otherwise.
-
-