org.elasticsearch.search.facet.query
Class QueryFacetBuilder

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

public class QueryFacetBuilder
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
QueryFacetBuilder(String name)
           
 
Method Summary
 QueryFacetBuilder facetFilter(FilterBuilder filter)
           
 QueryFacetBuilder global(boolean global)
          Marks the facet to run in a global scope, not bounded by any query.
 QueryFacetBuilder nested(String nested)
          Sets the nested path the facet will execute on.
 QueryFacetBuilder query(QueryBuilder query)
           
 QueryFacetBuilder scope(String scope)
          Marks the facet to run in a specific scope.
 XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params)
           
 
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

QueryFacetBuilder

public QueryFacetBuilder(String name)
Method Detail

global

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

Overrides:
global in class AbstractFacetBuilder

scope

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

Overrides:
scope in class AbstractFacetBuilder

facetFilter

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

nested

public QueryFacetBuilder 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

query

public QueryFacetBuilder query(QueryBuilder query)

toXContent

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


Copyright © 2009-2012. All Rights Reserved.