Package org.apache.lucene.codecs
Class DocValuesProducer.SortedSetDocsWithField
- java.lang.Object
-
- org.apache.lucene.codecs.DocValuesProducer.SortedSetDocsWithField
-
- All Implemented Interfaces:
Bits
- Enclosing class:
- DocValuesProducer
public static class DocValuesProducer.SortedSetDocsWithField extends java.lang.Object implements Bits
A simple implementation ofDocValuesProducer.getDocsWithField(org.apache.lucene.index.FieldInfo)
that returnstrue
if a document has any ordinals.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
Constructors Constructor Description SortedSetDocsWithField(SortedSetDocValues in, int maxDoc)
Creates aBits
returning true if the document has a value
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
get(int index)
Returns the value of the bit with the specifiedindex
.int
length()
Returns the number of bits in this set
-
-
-
Constructor Detail
-
SortedSetDocsWithField
public SortedSetDocsWithField(SortedSetDocValues in, int maxDoc)
Creates aBits
returning true if the document has a value
-
-
Method Detail
-
get
public boolean get(int index)
Description copied from interface:Bits
Returns the value of the bit with the specifiedindex
.- Specified by:
get
in 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:
true
if the bit is set,false
otherwise.
-
-