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 Object
- implements Bits
A simple implementation of DocValuesProducer.getDocsWithField(org.apache.lucene.index.FieldInfo) that
returns true 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.
|
Method Summary |
boolean |
get(int index)
Returns the value of the bit with the specified index. |
int |
length()
Returns the number of bits in this set |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DocValuesProducer.SortedSetDocsWithField
public DocValuesProducer.SortedSetDocsWithField(SortedSetDocValues in,
int maxDoc)
- Creates a
Bits returning true if the document has a value
get
public boolean get(int index)
- Description copied from interface:
Bits
- Returns the value of the bit with the specified
index.
- Specified by:
get in interface Bits
- 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.
length
public int length()
- Description copied from interface:
Bits
- Returns the number of bits in this set
- Specified by:
length in interface Bits
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.