org.elasticsearch.index.query.json
Class ConstantScoreQueryJsonQueryBuilder

java.lang.Object
  extended by org.elasticsearch.index.query.json.BaseJsonQueryBuilder
      extended by org.elasticsearch.index.query.json.ConstantScoreQueryJsonQueryBuilder
All Implemented Interfaces:
JsonQueryBuilder, QueryBuilder, ToJson

public class ConstantScoreQueryJsonQueryBuilder
extends BaseJsonQueryBuilder

A query that wraps a filter and simply returns a constant score equal to the query boost for every document in the filter.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.elasticsearch.util.json.ToJson
ToJson.MapParams, ToJson.Params
 
Field Summary
 
Fields inherited from interface org.elasticsearch.util.json.ToJson
EMPTY_PARAMS
 
Constructor Summary
ConstantScoreQueryJsonQueryBuilder(JsonFilterBuilder filterBuilder)
          A query that wraps a filter and simply returns a constant score equal to the query boost for every document in the filter.
 
Method Summary
 ConstantScoreQueryJsonQueryBuilder boost(float boost)
          Sets the boost for this query.
protected  void doJson(JsonBuilder builder, ToJson.Params params)
           
 
Methods inherited from class org.elasticsearch.index.query.json.BaseJsonQueryBuilder
buildAsBytes, buildAsString, buildAsUnsafeChars, toJson
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantScoreQueryJsonQueryBuilder

public ConstantScoreQueryJsonQueryBuilder(JsonFilterBuilder filterBuilder)
A query that wraps a filter and simply returns a constant score equal to the query boost for every document in the filter.

Parameters:
filterBuilder - The filter to wrap in a constant score query
Method Detail

boost

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


doJson

protected void doJson(JsonBuilder builder,
                      ToJson.Params params)
               throws java.io.IOException
Specified by:
doJson in class BaseJsonQueryBuilder
Throws:
java.io.IOException