org.elasticsearch.search.facet.histogram
Class HistogramScriptFacetBuilder

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

public class HistogramScriptFacetBuilder
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
HistogramScriptFacetBuilder(String name)
           
 
Method Summary
 HistogramScriptFacetBuilder bounds(Object from, Object to)
          Sets the bounds from and to for the facet.
 HistogramScriptFacetBuilder comparator(HistogramFacet.ComparatorType comparatorType)
           
 HistogramScriptFacetBuilder facetFilter(FilterBuilder filter)
           
 HistogramScriptFacetBuilder global(boolean global)
          Marks the facet to run in a global scope, not bounded by any query.
 HistogramScriptFacetBuilder interval(long interval)
           
 HistogramScriptFacetBuilder keyField(String keyFieldName)
           
 HistogramScriptFacetBuilder keyScript(String keyScript)
           
 HistogramScriptFacetBuilder lang(String lang)
          The language of the script.
 HistogramScriptFacetBuilder nested(String nested)
          Sets the nested path the facet will execute on.
 HistogramScriptFacetBuilder param(String name, Object value)
           
 HistogramScriptFacetBuilder scope(String scope)
          Marks the facet to run in a specific scope.
 XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params)
           
 HistogramScriptFacetBuilder 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

HistogramScriptFacetBuilder

public HistogramScriptFacetBuilder(String name)
Method Detail

lang

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


keyField

public HistogramScriptFacetBuilder keyField(String keyFieldName)

keyScript

public HistogramScriptFacetBuilder keyScript(String keyScript)

valueScript

public HistogramScriptFacetBuilder valueScript(String valueScript)

interval

public HistogramScriptFacetBuilder interval(long interval)

param

public HistogramScriptFacetBuilder param(String name,
                                         Object value)

comparator

public HistogramScriptFacetBuilder comparator(HistogramFacet.ComparatorType comparatorType)

global

public HistogramScriptFacetBuilder global(boolean global)
Marks the facet to run in a global scope, not bounded by any query.

Overrides:
global in class AbstractFacetBuilder

scope

public HistogramScriptFacetBuilder scope(String scope)
Marks the facet to run in a specific scope.

Overrides:
scope in class AbstractFacetBuilder

bounds

public HistogramScriptFacetBuilder bounds(Object from,
                                          Object to)
Sets the bounds from and to for the facet. Both performs bounds check and includes only values within the bounds, and improves performance.


facetFilter

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

nested

public HistogramScriptFacetBuilder 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.