Package org.apache.lucene.codecs
Class DocValuesProducer.SortedDocsWithField
java.lang.Object
org.apache.lucene.codecs.DocValuesProducer.SortedDocsWithField
- All Implemented Interfaces:
Bits
- Enclosing class:
- DocValuesProducer
A simple implementation of
DocValuesProducer.getDocsWithField(org.apache.lucene.index.FieldInfo) that
returns true if a document has an ordinal >= 0
Codecs can choose to use this (or implement it more efficiently another way), but in most cases a Bits is unnecessary anyway: users can check this as they go.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.util.Bits
Bits.MatchAllBits, Bits.MatchNoBits -
Field Summary
Fields inherited from interface org.apache.lucene.util.Bits
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionSortedDocsWithField(SortedDocValues in, int maxDoc) Creates aBitsreturning true if the document has a value -
Method Summary
-
Constructor Details
-
SortedDocsWithField
Creates aBitsreturning true if the document has a value
-
-
Method Details
-
get
public boolean get(int index) Description copied from interface:BitsReturns the value of the bit with the specifiedindex.- Specified by:
getin interfaceBits- Parameters:
index- index, should be non-negative and <Bits.length(). The result of passing negative or out of bounds values is undefined by this interface, just don't do it!- Returns:
trueif the bit is set,falseotherwise.
-
length
public int length()Description copied from interface:BitsReturns the number of bits in this set
-