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
ABitSetProducer
that wraps a query and caches matchingBitSet
s per segment.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.Map<IndexReader.CacheKey,DocIdSet>
cache
private Query
query
-
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 boolean
equals(java.lang.Object o)
BitSet
getBitSet(LeafReaderContext context)
Produce aBitSet
matching the expected documents on the given segment.Query
getQuery()
Gets the contained query.int
hashCode()
java.lang.String
toString()
-
-
-
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:BitSetProducer
Produce aBitSet
matching the expected documents on the given segment. This may returnnull
if no documents match.- Specified by:
getBitSet
in interfaceBitSetProducer
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-