public abstract class FieldStats<T> extends java.lang.Object implements Writeable, ToXContent
| Modifier and Type | Class and Description |
|---|---|
static class |
FieldStats.Date |
static class |
FieldStats.Double |
static class |
FieldStats.GeoPoint |
static class |
FieldStats.Ip |
static class |
FieldStats.Long |
static class |
FieldStats.Text |
Writeable.Reader<V>, Writeable.Writer<V>ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
protected T |
maxValue |
protected T |
minValue |
EMPTY_PARAMS| Modifier and Type | Method and Description |
|---|---|
void |
accumulate(FieldStats other)
Accumulates the provided stats into this stats instance.
|
protected abstract int |
compare(T o1,
T o2) |
boolean |
equals(java.lang.Object o) |
int |
getDensity() |
java.lang.String |
getDisplayType() |
long |
getDocCount() |
long |
getMaxDoc() |
T |
getMaxValue() |
abstract java.lang.String |
getMaxValueAsString() |
T |
getMinValue() |
abstract java.lang.String |
getMinValueAsString() |
long |
getSumDocFreq() |
long |
getSumTotalTermFreq() |
int |
hashCode() |
boolean |
hasMinMax() |
boolean |
isAggregatable() |
boolean |
isSearchable() |
boolean |
match(IndexConstraint constraint) |
static FieldStats |
readFrom(StreamInput in) |
protected void |
toInnerXContent(XContentBuilder builder) |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
protected void |
updateMinMax(T min,
T max) |
protected abstract T |
valueOf(java.lang.String value,
java.lang.String optionalFormat) |
protected abstract void |
writeMinMax(StreamOutput out) |
void |
writeTo(StreamOutput out)
Write this into the StreamOutput.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitisFragmentpublic java.lang.String getDisplayType()
public boolean hasMinMax()
public long getMaxDoc()
public long getDocCount()
public int getDensity()
public long getSumDocFreq()
public long getSumTotalTermFreq()
public boolean isSearchable()
true if any of the instances of the field name is searchable.public boolean isAggregatable()
true if any of the instances of the field name is aggregatable.public T getMinValue()
public T getMaxValue()
public abstract java.lang.String getMinValueAsString()
public abstract java.lang.String getMaxValueAsString()
protected abstract T valueOf(java.lang.String value, java.lang.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 final void accumulate(FieldStats other)
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent in interface ToXContentjava.io.IOExceptionprotected void toInnerXContent(XContentBuilder builder) throws java.io.IOException
java.io.IOExceptionpublic final void writeTo(StreamOutput out) throws java.io.IOException
Writeableprotected abstract void writeMinMax(StreamOutput out) throws java.io.IOException
java.io.IOExceptionpublic boolean match(IndexConstraint constraint)
true if this instance matches with the provided index constraint,
otherwise false is returnedpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic static FieldStats readFrom(StreamInput in) throws java.io.IOException
java.io.IOException