public abstract class DocValuesStats<T>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DocValuesStats.DoubleDocValuesStats
Holds DocValues statistics for a numeric field storing
double values. |
static class |
DocValuesStats.LongDocValuesStats
Holds DocValues statistics for a numeric field storing
long values. |
static class |
DocValuesStats.NumericDocValuesStats<T extends java.lang.Number>
Holds statistics for a numeric DocValues field.
|
static class |
DocValuesStats.SortedDocValuesStats
Holds statistics for a sorted DocValues field.
|
static class |
DocValuesStats.SortedDoubleDocValuesStats
Holds DocValues statistics for a sorted-numeric field storing
double values. |
static class |
DocValuesStats.SortedLongDocValuesStats
Holds DocValues statistics for a sorted-numeric field storing
long values. |
static class |
DocValuesStats.SortedNumericDocValuesStats<T extends java.lang.Number>
Holds statistics for a sorted-numeric DocValues field.
|
static class |
DocValuesStats.SortedSetDocValuesStats
Holds statistics for a sorted-set DocValues field.
|
Modifier and Type | Field and Description |
---|---|
private int |
count |
protected java.lang.String |
field |
protected T |
max |
protected T |
min |
private int |
missing |
Modifier | Constructor and Description |
---|---|
protected |
DocValuesStats(java.lang.String field,
T initialMin,
T initialMax) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
accumulate(int doc) |
(package private) void |
addMissing() |
private static BytesRef |
copyFrom(BytesRef src,
BytesRef dest) |
int |
count()
The number of documents which have a value of the field.
|
protected abstract void |
doAccumulate(int count)
Called after
accumulate(int) was processed and verified that the document has a value for
the field. |
java.lang.String |
field()
The field for which these stats were computed.
|
protected abstract boolean |
hasValue(int doc)
Returns whether the given document has a value for the requested DocValues field.
|
protected abstract boolean |
init(LeafReaderContext context)
Initializes this object with the given reader context.
|
T |
max()
The maximum value of the field.
|
T |
min()
The minimum value of the field.
|
int |
missing()
The number of documents which do not have a value of the field.
|
private int missing
private int count
protected final java.lang.String field
protected T min
protected T max
protected abstract void doAccumulate(int count) throws java.io.IOException
accumulate(int)
was processed and verified that the document has a value for
the field. Implementations should update the statistics based on the value of the current document.count
- the updated number of documents with value for this field.java.io.IOException
protected abstract boolean init(LeafReaderContext context) throws java.io.IOException
java.io.IOException
protected abstract boolean hasValue(int doc) throws java.io.IOException
java.io.IOException
final void accumulate(int doc) throws java.io.IOException
java.io.IOException
final void addMissing()
public final java.lang.String field()
public final int count()
public final int missing()