org.elasticsearch.index.query.json
Class PrefixJsonQueryBuilder

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

public class PrefixJsonQueryBuilder
extends BaseJsonQueryBuilder

A Query that matches documents containing terms with a specified prefix.


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
PrefixJsonQueryBuilder(java.lang.String name, java.lang.String prefix)
          A Query that matches documents containing terms with a specified prefix.
 
Method Summary
 PrefixJsonQueryBuilder boost(float boost)
          Sets the boost for this query.
 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

PrefixJsonQueryBuilder

public PrefixJsonQueryBuilder(java.lang.String name,
                              java.lang.String prefix)
A Query that matches documents containing terms with a specified prefix.

Parameters:
name - The name of the field
prefix - The prefix query
Method Detail

boost

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

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