public class RangeScriptFacetBuilder extends FacetBuilder
FacetBuilder.Mode
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
facetFilter, global, mode, name, nested
EMPTY_PARAMS
Constructor and Description |
---|
RangeScriptFacetBuilder(String name) |
Modifier and Type | Method and Description |
---|---|
RangeScriptFacetBuilder |
addRange(double from,
double to)
Adds a range entry with explicit from and to.
|
RangeScriptFacetBuilder |
addUnboundedFrom(double to)
Adds a range entry with explicit to and unbounded from.
|
RangeScriptFacetBuilder |
addUnboundedTo(double from)
Adds a range entry with explicit from and unbounded to.
|
RangeScriptFacetBuilder |
facetFilter(FilterBuilder filter) |
RangeScriptFacetBuilder |
global(boolean global)
Should the facet run in global mode (not bounded by the search query) or not (bounded by
the search query).
|
RangeScriptFacetBuilder |
keyScript(String keyScript) |
RangeScriptFacetBuilder |
lang(String lang)
The language of the script.
|
RangeScriptFacetBuilder |
nested(String nested)
Sets the nested path the facet will execute on.
|
RangeScriptFacetBuilder |
param(String name,
Object value) |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
RangeScriptFacetBuilder |
valueScript(String valueScript) |
addFilterFacetAndGlobal, mode
public RangeScriptFacetBuilder(String name)
public RangeScriptFacetBuilder lang(String lang)
public RangeScriptFacetBuilder keyScript(String keyScript)
public RangeScriptFacetBuilder valueScript(String valueScript)
public RangeScriptFacetBuilder param(String name, Object value)
public RangeScriptFacetBuilder addRange(double from, double to)
from
- The from range limitto
- The to range limitpublic RangeScriptFacetBuilder addUnboundedTo(double from)
from
- the from range limit, to is unbounded.public RangeScriptFacetBuilder addUnboundedFrom(double to)
to
- the to range limit, from is unbounded.public RangeScriptFacetBuilder global(boolean global)
global
in class FacetBuilder
public RangeScriptFacetBuilder facetFilter(FilterBuilder filter)
facetFilter
in class FacetBuilder
public RangeScriptFacetBuilder nested(String nested)
nested
in class FacetBuilder
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
IOException
Copyright © 2009–2015. All rights reserved.