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 Object
implements ToXContent


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.MapParams, ToXContent.Params
 
Field Summary
protected  FilterBuilder facetFilter
           
protected  String name
           
protected  String nested
           
protected  String scope
           
 
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
 
Constructor Summary
protected AbstractFacetBuilder(String name)
           
 
Method Summary
protected  void addFilterFacetAndGlobal(XContentBuilder builder, ToXContent.Params params)
           
 AbstractFacetBuilder facetFilter(FilterBuilder filter)
           
 AbstractFacetBuilder global(boolean global)
          Marks the facet to run in a global scope, not bounded by any query.
 AbstractFacetBuilder nested(String nested)
          Sets the nested path the facet will execute on.
 AbstractFacetBuilder scope(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 String name

scope

protected String scope

facetFilter

protected FilterBuilder facetFilter

nested

protected String nested
Constructor Detail

AbstractFacetBuilder

protected AbstractFacetBuilder(String name)
Method Detail

facetFilter

public AbstractFacetBuilder facetFilter(FilterBuilder filter)

nested

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


global

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


scope

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


addFilterFacetAndGlobal

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


Copyright © 2009-2012. All Rights Reserved.