org.elasticsearch.index.query
Class TopChildrenQueryBuilder

java.lang.Object
  extended by org.elasticsearch.index.query.BaseQueryBuilder
      extended by org.elasticsearch.index.query.TopChildrenQueryBuilder
All Implemented Interfaces:
ToXContent, BoostableQueryBuilder<TopChildrenQueryBuilder>, QueryBuilder

public class TopChildrenQueryBuilder
extends BaseQueryBuilder
implements BoostableQueryBuilder<TopChildrenQueryBuilder>


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.MapParams, ToXContent.Params
 
Field Summary
 
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
 
Constructor Summary
TopChildrenQueryBuilder(String type, QueryBuilder queryBuilder)
           
 
Method Summary
 TopChildrenQueryBuilder boost(float boost)
          Sets the boost for this query.
protected  void doXContent(XContentBuilder builder, ToXContent.Params params)
           
 TopChildrenQueryBuilder factor(int factor)
          Controls the multiplication factor of the initial hits required from the child query over the main query request.
 TopChildrenQueryBuilder incrementalFactor(int incrementalFactor)
          Sets the incremental factor when the query needs to be re-run in order to fetch more results.
 TopChildrenQueryBuilder scope(String scope)
          The scope of the query, which can later be used, for example, to run facets against the child docs that matches the query.
 TopChildrenQueryBuilder score(String score)
          How to compute the score.
 
Methods inherited from class org.elasticsearch.index.query.BaseQueryBuilder
buildAsBytes, buildAsBytes, toString, toXContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TopChildrenQueryBuilder

public TopChildrenQueryBuilder(String type,
                               QueryBuilder queryBuilder)
Method Detail

scope

public TopChildrenQueryBuilder scope(String scope)
The scope of the query, which can later be used, for example, to run facets against the child docs that matches the query.


score

public TopChildrenQueryBuilder score(String score)
How to compute the score. Possible values are: max, sum, or avg. Defaults to max.


factor

public TopChildrenQueryBuilder factor(int factor)
Controls the multiplication factor of the initial hits required from the child query over the main query request. Defaults to 5.


incrementalFactor

public TopChildrenQueryBuilder incrementalFactor(int incrementalFactor)
Sets the incremental factor when the query needs to be re-run in order to fetch more results. Defaults to 2.


boost

public TopChildrenQueryBuilder boost(float boost)
Sets the boost for this query. Documents matching this query will (in addition to the normal weightings) have their score multiplied by the boost provided.

Specified by:
boost in interface BoostableQueryBuilder<TopChildrenQueryBuilder>

doXContent

protected void doXContent(XContentBuilder builder,
                          ToXContent.Params params)
                   throws IOException
Specified by:
doXContent in class BaseQueryBuilder
Throws:
IOException


Copyright © 2009-2012. All Rights Reserved.