|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.elasticsearch.search.facet.AbstractFacetBuilder org.elasticsearch.search.facet.histogram.HistogramFacetBuilder
public class HistogramFacetBuilder
A facet builder of histogram facets.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent |
---|
ToXContent.MapParams, ToXContent.Params |
Field Summary |
---|
Fields inherited from class org.elasticsearch.search.facet.AbstractFacetBuilder |
---|
facetFilter, name, nested, scope |
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent |
---|
EMPTY_PARAMS |
Constructor Summary | |
---|---|
HistogramFacetBuilder(String name)
Constructs a new histogram facet with the provided facet logical name. |
Method Summary | |
---|---|
HistogramFacetBuilder |
bounds(Object from,
Object to)
Sets the bounds from and to for the facet. |
HistogramFacetBuilder |
comparator(HistogramFacet.ComparatorType comparatorType)
|
HistogramFacetBuilder |
facetFilter(FilterBuilder filter)
An additional filter used to further filter down the set of documents the facet will run on. |
HistogramFacetBuilder |
field(String field)
The field name to perform the histogram facet. |
HistogramFacetBuilder |
global(boolean global)
Should the facet run in global mode (not bounded by the search query) or not (bounded by the search query). |
HistogramFacetBuilder |
interval(long interval)
The interval used to control the bucket "size" where each key value of a hit will fall into. |
HistogramFacetBuilder |
interval(long interval,
TimeUnit unit)
The interval used to control the bucket "size" where each key value of a hit will fall into. |
HistogramFacetBuilder |
keyField(String keyField)
The field name to use in order to control where the hit will "fall into" within the histogram entries. |
HistogramFacetBuilder |
nested(String nested)
Sets the nested path the facet will execute on. |
HistogramFacetBuilder |
scope(String scope)
Marks the facet to run in a specific scope. |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params)
|
HistogramFacetBuilder |
valueField(String valueField)
The field name to use as the value of the hit to compute data based on values within the interval (for example, total). |
Methods inherited from class org.elasticsearch.search.facet.AbstractFacetBuilder |
---|
addFilterFacetAndGlobal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HistogramFacetBuilder(String name)
name
- The logical name of the facetMethod Detail |
---|
public HistogramFacetBuilder field(String field)
keyField(String)
and valueField(String)
.
public HistogramFacetBuilder keyField(String keyField)
public HistogramFacetBuilder valueField(String valueField)
public HistogramFacetBuilder interval(long interval)
public HistogramFacetBuilder interval(long interval, TimeUnit unit)
public HistogramFacetBuilder bounds(Object from, Object to)
public HistogramFacetBuilder comparator(HistogramFacet.ComparatorType comparatorType)
public HistogramFacetBuilder global(boolean global)
global
in class AbstractFacetBuilder
public HistogramFacetBuilder scope(String scope)
scope
in class AbstractFacetBuilder
public HistogramFacetBuilder facetFilter(FilterBuilder filter)
facetFilter
in class AbstractFacetBuilder
public HistogramFacetBuilder nested(String nested)
nested
in class AbstractFacetBuilder
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |