org.elasticsearch.index.query
Class FuzzyLikeThisQueryBuilder
java.lang.Object
org.elasticsearch.index.query.BaseQueryBuilder
org.elasticsearch.index.query.FuzzyLikeThisQueryBuilder
- All Implemented Interfaces:
- ToXContent, BoostableQueryBuilder<FuzzyLikeThisQueryBuilder>, QueryBuilder
public class FuzzyLikeThisQueryBuilder
- extends BaseQueryBuilder
- implements BoostableQueryBuilder<FuzzyLikeThisQueryBuilder>
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.
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.