public class HistogramFacetBuilder extends FacetBuilder
FacetBuilder.Mode
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
facetFilter, global, mode, name, nested
EMPTY_PARAMS
Constructor and Description |
---|
HistogramFacetBuilder(String name)
Constructs a new histogram facet with the provided facet logical name.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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).
|
addFilterFacetAndGlobal, mode
public HistogramFacetBuilder(String name)
name
- The logical name of the facetpublic 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 comparator(HistogramFacet.ComparatorType comparatorType)
public HistogramFacetBuilder global(boolean global)
global
in class FacetBuilder
public HistogramFacetBuilder facetFilter(FilterBuilder filter)
facetFilter
in class FacetBuilder
public HistogramFacetBuilder nested(String nested)
nested
in class FacetBuilder
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
IOException
Copyright © 2009–2015. All rights reserved.