org.elasticsearch.search.facet
Class AbstractFacetBuilder

java.lang.Object
  extended by org.elasticsearch.search.facet.AbstractFacetBuilder
All Implemented Interfaces:
ToXContent
Direct Known Subclasses:
DateHistogramFacetBuilder, FilterFacetBuilder, GeoDistanceFacetBuilder, HistogramFacetBuilder, HistogramScriptFacetBuilder, QueryFacetBuilder, RangeFacetBuilder, RangeScriptFacetBuilder, StatisticalFacetBuilder, StatisticalScriptFacetBuilder, TermsFacetBuilder, TermsStatsFacetBuilder

public abstract class AbstractFacetBuilder
extends java.lang.Object
implements ToXContent


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.MapParams, ToXContent.Params
 
Field Summary
protected  XContentFilterBuilder facetFilter
           
protected  java.lang.String name
           
protected  java.lang.String scope
           
 
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
 
Constructor Summary
protected AbstractFacetBuilder(java.lang.String name)
           
 
Method Summary
protected  void addFilterFacetAndGlobal(XContentBuilder builder, ToXContent.Params params)
           
 AbstractFacetBuilder facetFilter(XContentFilterBuilder filter)
           
 AbstractFacetBuilder global(boolean global)
          Marks the facet to run in a global scope, not bounded by any query.
 AbstractFacetBuilder scope(java.lang.String scope)
          Marks the facet to run in a specific scope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContent
toXContent
 

Field Detail

name

protected final java.lang.String name

scope

protected java.lang.String scope

facetFilter

protected XContentFilterBuilder facetFilter
Constructor Detail

AbstractFacetBuilder

protected AbstractFacetBuilder(java.lang.String name)
Method Detail

facetFilter

public AbstractFacetBuilder facetFilter(XContentFilterBuilder filter)

global

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


scope

public AbstractFacetBuilder scope(java.lang.String scope)
Marks the facet to run in a specific scope.


addFilterFacetAndGlobal

protected void addFilterFacetAndGlobal(XContentBuilder builder,
                                       ToXContent.Params params)
                                throws java.io.IOException
Throws:
java.io.IOException