public abstract class FieldStats<T extends Comparable<T>> extends Object implements Streamable, ToXContent
| Modifier and Type | Class and Description |
|---|---|
static class |
FieldStats.Date |
static class |
FieldStats.Double |
static class |
FieldStats.Float |
static class |
FieldStats.Long |
static class |
FieldStats.Text |
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
protected T |
maxValue |
protected T |
minValue |
EMPTY_PARAMS| Modifier | Constructor and Description |
|---|---|
protected |
FieldStats() |
protected |
FieldStats(int type,
long maxDoc,
long docCount,
long sumDocFreq,
long sumTotalTermFreq) |
| Modifier and Type | Method and Description |
|---|---|
void |
append(FieldStats stats)
Merges the provided stats into this stats instance.
|
int |
getDensity() |
long |
getDocCount() |
long |
getMaxDoc() |
T |
getMaxValue() |
abstract String |
getMaxValueAsString() |
T |
getMinValue() |
abstract String |
getMinValueAsString() |
long |
getSumDocFreq() |
long |
getSumTotalTermFreq() |
boolean |
match(IndexConstraint constraint) |
static FieldStats |
read(StreamInput in) |
void |
readFrom(StreamInput in) |
protected void |
toInnerXContent(XContentBuilder builder) |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
protected abstract T |
valueOf(String value,
String optionalFormat) |
void |
writeTo(StreamOutput out) |
protected T extends Comparable<T> minValue
protected T extends Comparable<T> maxValue
protected FieldStats()
protected FieldStats(int type,
long maxDoc,
long docCount,
long sumDocFreq,
long sumTotalTermFreq)
public long getMaxDoc()
public long getDocCount()
public int getDensity()
public long getSumDocFreq()
public long getSumTotalTermFreq()
public T getMinValue()
public T getMaxValue()
public abstract String getMinValueAsString()
public abstract String getMaxValueAsString()
protected abstract T valueOf(String value, String optionalFormat)
value - The string to be parsedoptionalFormat - A string describing how to parse the specified value. Whether this parameter is supported
depends on the implementation. If optionalFormat is specified and the implementation
doesn't support it an UnsupportedOperationException is thrownpublic void append(FieldStats stats)
public boolean match(IndexConstraint constraint)
true if this instance matches with the provided index constraint, otherwise false is returnedpublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent in interface ToXContentIOExceptionprotected void toInnerXContent(XContentBuilder builder) throws IOException
IOExceptionpublic void readFrom(StreamInput in) throws IOException
readFrom in interface StreamableIOExceptionpublic void writeTo(StreamOutput out) throws IOException
writeTo in interface StreamableIOExceptionpublic static FieldStats read(StreamInput in) throws IOException
IOExceptionCopyright © 2009–2017. All rights reserved.