org.elasticsearch.search.facet.range
Class RangeScriptFacetBuilder

java.lang.Object
  extended by org.elasticsearch.search.facet.AbstractFacetBuilder
      extended by org.elasticsearch.search.facet.range.RangeScriptFacetBuilder
All Implemented Interfaces:
ToXContent

public class RangeScriptFacetBuilder
extends AbstractFacetBuilder


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
RangeScriptFacetBuilder(String name)
           
 
Method Summary
 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)
           
 RangeScriptFacetBuilder scope(String scope)
          Marks the facet to run in a specific scope.
 XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params)
           
 RangeScriptFacetBuilder valueScript(String valueScript)
           
 
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

RangeScriptFacetBuilder

public RangeScriptFacetBuilder(String name)
Method Detail

lang

public RangeScriptFacetBuilder lang(String lang)
The language of the script.


keyScript

public RangeScriptFacetBuilder keyScript(String keyScript)

valueScript

public RangeScriptFacetBuilder valueScript(String valueScript)

param

public RangeScriptFacetBuilder param(String name,
                                     Object value)

addRange

public RangeScriptFacetBuilder addRange(double from,
                                        double to)
Adds a range entry with explicit from and to.

Parameters:
from - The from range limit
to - 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(String scope)
Marks the facet to run in a specific scope.

Overrides:
scope in class AbstractFacetBuilder

facetFilter

public RangeScriptFacetBuilder facetFilter(FilterBuilder filter)
Overrides:
facetFilter in class AbstractFacetBuilder

nested

public RangeScriptFacetBuilder nested(String nested)
Sets the nested path the facet will execute on. A match (root object) will then cause all the nested objects matching the path to be computed into the facet.

Overrides:
nested in class AbstractFacetBuilder

toXContent

public XContentBuilder toXContent(XContentBuilder builder,
                                  ToXContent.Params params)
                           throws IOException
Throws:
IOException


Copyright © 2009-2012. All Rights Reserved.