Package org.apache.lucene.search.join
Class QueryBitSetProducer
- java.lang.Object
-
- org.apache.lucene.search.join.QueryBitSetProducer
-
- All Implemented Interfaces:
BitSetProducer
public class QueryBitSetProducer extends java.lang.Object implements BitSetProducer
ABitSetProducerthat wraps a query and caches matchingBitSets per segment.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.Map<IndexReader.CacheKey,DocIdSet>cacheprivate Queryquery
-
Constructor Summary
Constructors Constructor Description QueryBitSetProducer(Query query)Wraps another query's result and caches it into bitsets.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)BitSetgetBitSet(LeafReaderContext context)Produce aBitSetmatching the expected documents on the given segment.QuerygetQuery()Gets the contained query.inthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
query
private final Query query
-
cache
final java.util.Map<IndexReader.CacheKey,DocIdSet> cache
-
-
Constructor Detail
-
QueryBitSetProducer
public QueryBitSetProducer(Query query)
Wraps another query's result and caches it into bitsets.- Parameters:
query- Query to cache results of
-
-
Method Detail
-
getQuery
public Query getQuery()
Gets the contained query.- Returns:
- the contained query.
-
getBitSet
public BitSet getBitSet(LeafReaderContext context) throws java.io.IOException
Description copied from interface:BitSetProducerProduce aBitSetmatching the expected documents on the given segment. This may returnnullif no documents match.- Specified by:
getBitSetin interfaceBitSetProducer- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-