Package org.apache.lucene.index
Class DocValuesFieldUpdates.SingleValueDocValuesFieldUpdates
- java.lang.Object
-
- org.apache.lucene.index.DocValuesFieldUpdates
-
- org.apache.lucene.index.DocValuesFieldUpdates.SingleValueDocValuesFieldUpdates
-
- All Implemented Interfaces:
Accountable
- Direct Known Subclasses:
NumericDocValuesFieldUpdates.SingleValueNumericDocValuesFieldUpdates
- Enclosing class:
- DocValuesFieldUpdates
abstract static class DocValuesFieldUpdates.SingleValueDocValuesFieldUpdates extends DocValuesFieldUpdates
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.index.DocValuesFieldUpdates
DocValuesFieldUpdates.AbstractIterator, DocValuesFieldUpdates.Iterator, DocValuesFieldUpdates.SingleValueDocValuesFieldUpdates
-
-
Field Summary
Fields Modifier and Type Field Description private BitSet
bitSet
private boolean
hasAtLeastOneValue
private BitSet
hasNoValue
-
Constructor Summary
Constructors Modifier Constructor Description protected
SingleValueDocValuesFieldUpdates(int maxDoc, long delGen, java.lang.String field, DocValuesType type)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) void
add(int doc, long value)
(package private) void
add(int docId, DocValuesFieldUpdates.Iterator iterator)
Adds the value for the given docID.(package private) void
add(int doc, BytesRef value)
(package private) boolean
any()
Returns true if this instance contains any updates.protected abstract BytesRef
binaryValue()
(package private) DocValuesFieldUpdates.Iterator
iterator()
Returns anDocValuesFieldUpdates.Iterator
over the updated documents and their values.protected abstract long
longValue()
long
ramBytesUsed()
Return the memory usage of this object in bytes.(package private) void
reset(int doc)
Adds an update that resets the documents value.-
Methods inherited from class org.apache.lucene.index.DocValuesFieldUpdates
add, ensureFinished, finish, getFinished, grow, mergedIterator, resize, size, swap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
-
-
-
Constructor Detail
-
SingleValueDocValuesFieldUpdates
protected SingleValueDocValuesFieldUpdates(int maxDoc, long delGen, java.lang.String field, DocValuesType type)
-
-
Method Detail
-
add
void add(int doc, long value)
- Specified by:
add
in classDocValuesFieldUpdates
-
add
void add(int doc, BytesRef value)
- Specified by:
add
in classDocValuesFieldUpdates
-
reset
void reset(int doc)
Description copied from class:DocValuesFieldUpdates
Adds an update that resets the documents value.- Overrides:
reset
in classDocValuesFieldUpdates
- Parameters:
doc
- the doc to update
-
add
void add(int docId, DocValuesFieldUpdates.Iterator iterator)
Description copied from class:DocValuesFieldUpdates
Adds the value for the given docID. This method prevents conditional calls toDocValuesFieldUpdates.Iterator.longValue()
orDocValuesFieldUpdates.Iterator.binaryValue()
since the implementation knows if it's a long value iterator or binary value- Specified by:
add
in classDocValuesFieldUpdates
-
binaryValue
protected abstract BytesRef binaryValue()
-
longValue
protected abstract long longValue()
-
any
boolean any()
Description copied from class:DocValuesFieldUpdates
Returns true if this instance contains any updates.- Overrides:
any
in classDocValuesFieldUpdates
-
ramBytesUsed
public long ramBytesUsed()
Description copied from interface:Accountable
Return the memory usage of this object in bytes. Negative values are illegal.- Specified by:
ramBytesUsed
in interfaceAccountable
- Overrides:
ramBytesUsed
in classDocValuesFieldUpdates
-
iterator
DocValuesFieldUpdates.Iterator iterator()
Description copied from class:DocValuesFieldUpdates
Returns anDocValuesFieldUpdates.Iterator
over the updated documents and their values.- Specified by:
iterator
in classDocValuesFieldUpdates
-
-