org.elasticsearch.index.query
Class FuzzyLikeThisQueryBuilder

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

public class FuzzyLikeThisQueryBuilder
extends BaseQueryBuilder
implements BoostableQueryBuilder<FuzzyLikeThisQueryBuilder>


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
FuzzyLikeThisQueryBuilder()
          Constructs a new fuzzy like this query which uses the "_all" field.
FuzzyLikeThisQueryBuilder(String... fields)
          Sets the field names that will be used when generating the 'Fuzzy Like This' query.
 
Method Summary
 FuzzyLikeThisQueryBuilder analyzer(String analyzer)
          The analyzer that will be used to analyze the text.
 FuzzyLikeThisQueryBuilder boost(float boost)
          Sets the boost for this query.
protected  void doXContent(XContentBuilder builder, ToXContent.Params params)
           
 FuzzyLikeThisQueryBuilder ignoreTF(boolean ignoreTF)
           
 FuzzyLikeThisQueryBuilder likeText(String likeText)
          The text to use in order to find documents that are "like" this.
 FuzzyLikeThisQueryBuilder maxQueryTerms(int maxQueryTerms)
           
 FuzzyLikeThisQueryBuilder minSimilarity(float minSimilarity)
           
 FuzzyLikeThisQueryBuilder prefixLength(int prefixLength)
           
 
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

FuzzyLikeThisQueryBuilder

public FuzzyLikeThisQueryBuilder()
Constructs a new fuzzy like this query which uses the "_all" field.


FuzzyLikeThisQueryBuilder

public FuzzyLikeThisQueryBuilder(String... fields)
Sets the field names that will be used when generating the 'Fuzzy Like This' query.

Parameters:
fields - the field names that will be used when generating the 'Fuzzy Like This' query.
Method Detail

likeText

public FuzzyLikeThisQueryBuilder likeText(String likeText)
The text to use in order to find documents that are "like" this.


minSimilarity

public FuzzyLikeThisQueryBuilder minSimilarity(float minSimilarity)

prefixLength

public FuzzyLikeThisQueryBuilder prefixLength(int prefixLength)

maxQueryTerms

public FuzzyLikeThisQueryBuilder maxQueryTerms(int maxQueryTerms)

ignoreTF

public FuzzyLikeThisQueryBuilder ignoreTF(boolean ignoreTF)

analyzer

public FuzzyLikeThisQueryBuilder analyzer(String analyzer)
The analyzer that will be used to analyze the text. Defaults to the analyzer associated with the fied.


boost

public FuzzyLikeThisQueryBuilder boost(float boost)
Description copied from interface: BoostableQueryBuilder
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<FuzzyLikeThisQueryBuilder>

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.