org.elasticsearch.search.facet.range
Class RangeScriptFacetBuilder
java.lang.Object
org.elasticsearch.search.facet.AbstractFacetBuilder
org.elasticsearch.search.facet.range.RangeScriptFacetBuilder
- All Implemented Interfaces:
- ToXContent
public class RangeScriptFacetBuilder
- extends AbstractFacetBuilder
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RangeScriptFacetBuilder
public RangeScriptFacetBuilder(java.lang.String name)
lang
public RangeScriptFacetBuilder lang(java.lang.String lang)
- The language of the script.
keyScript
public RangeScriptFacetBuilder keyScript(java.lang.String keyScript)
valueScript
public RangeScriptFacetBuilder valueScript(java.lang.String valueScript)
param
public RangeScriptFacetBuilder param(java.lang.String name,
java.lang.Object value)
addRange
public RangeScriptFacetBuilder addRange(double from,
double to)
- Adds a range entry with explicit from and to.
- Parameters:
from
- The from range limitto
- The to range limit
addUnboundedTo
public RangeScriptFacetBuilder addUnboundedTo(double from)
- Adds a range entry with explicit from and unbounded to.
- Parameters:
from
- the from range limit, to is unbounded.
addUnboundedFrom
public RangeScriptFacetBuilder addUnboundedFrom(double to)
- Adds a range entry with explicit to and unbounded from.
- Parameters:
to
- the to range limit, from is unbounded.
global
public RangeScriptFacetBuilder global(boolean global)
- Should the facet run in global mode (not bounded by the search query) or not (bounded by
the search query). Defaults to false.
- Overrides:
global
in class AbstractFacetBuilder
scope
public RangeScriptFacetBuilder scope(java.lang.String scope)
- Marks the facet to run in a specific scope.
- Overrides:
scope
in class AbstractFacetBuilder
facetFilter
public RangeScriptFacetBuilder facetFilter(XContentFilterBuilder filter)
- Overrides:
facetFilter
in class AbstractFacetBuilder
toXContent
public XContentBuilder toXContent(XContentBuilder builder,
ToXContent.Params params)
throws java.io.IOException
- Throws:
java.io.IOException