public class FuzzyQueryBuilder extends AbstractQueryBuilder<FuzzyQueryBuilder> implements MultiTermQueryBuilder
Writeable.Reader<V>, Writeable.Writer<V>ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description | 
|---|---|
| static Fuzziness | DEFAULT_FUZZINESSDefault maximum edit distance. | 
| static int | DEFAULT_MAX_EXPANSIONSDefault maximum number of terms that the fuzzy query will expand to. | 
| static int | DEFAULT_PREFIX_LENGTHDefault number of initial characters which will not be “fuzzified”. | 
| static boolean | DEFAULT_TRANSPOSITIONSDefault as to whether transpositions should be treated as a primitive edit operation,
 instead of classic Levenshtein algorithm. | 
| static java.lang.String | NAME | 
boost, BOOST_FIELD, DEFAULT_BOOST, NAME_FIELD, queryNameEMPTY_PARAMS| Constructor and Description | 
|---|
| FuzzyQueryBuilder(StreamInput in)Read from a stream. | 
| FuzzyQueryBuilder(java.lang.String fieldName,
                 boolean value)Deprecated.  | 
| FuzzyQueryBuilder(java.lang.String fieldName,
                 double value)Deprecated.  | 
| FuzzyQueryBuilder(java.lang.String fieldName,
                 float value)Deprecated.  | 
| FuzzyQueryBuilder(java.lang.String fieldName,
                 int value)Deprecated.  | 
| FuzzyQueryBuilder(java.lang.String fieldName,
                 long value)Deprecated.  | 
| FuzzyQueryBuilder(java.lang.String fieldName,
                 java.lang.Object value)Deprecated.  | 
| FuzzyQueryBuilder(java.lang.String fieldName,
                 java.lang.String value)Deprecated.  | 
| Modifier and Type | Method and Description | 
|---|---|
| protected boolean | doEquals(FuzzyQueryBuilder other)Indicates whether some other  QueryBuilderobject of the same type is "equal to" this one. | 
| protected int | doHashCode() | 
| protected org.apache.lucene.search.Query | doToQuery(QueryShardContext context) | 
| protected void | doWriteTo(StreamOutput out) | 
| protected void | doXContent(XContentBuilder builder,
          ToXContent.Params params) | 
| java.lang.String | fieldName() | 
| static java.util.Optional<FuzzyQueryBuilder> | fromXContent(QueryParseContext parseContext) | 
| Fuzziness | fuzziness() | 
| FuzzyQueryBuilder | fuzziness(Fuzziness fuzziness) | 
| java.lang.String | getWriteableName()Returns the name of the writeable object | 
| int | maxExpansions() | 
| FuzzyQueryBuilder | maxExpansions(int maxExpansions) | 
| int | prefixLength() | 
| FuzzyQueryBuilder | prefixLength(int prefixLength) | 
| java.lang.String | rewrite() | 
| FuzzyQueryBuilder | rewrite(java.lang.String rewrite) | 
| boolean | transpositions() | 
| FuzzyQueryBuilder | transpositions(boolean transpositions) | 
| java.lang.Object | value() | 
addValidationError, boost, boost, convertToBytesRefIfString, convertToStringIfBytesRef, declareStandardFields, doRewrite, equals, extractInnerHitBuilders, getName, hashCode, printBoostAndQueryName, queryName, queryName, readQueries, requireValue, rewrite, throwParsingExceptionOnMultipleFields, toFilter, toQueries, toQuery, toXContent, writeQueries, writeTobuildAsBytes, buildAsBytes, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitboost, boost, getName, queryName, queryName, rewrite, rewriteQuery, toFilter, toQueryisFragmenttoXContentpublic static final java.lang.String NAME
public static final Fuzziness DEFAULT_FUZZINESS
public static final int DEFAULT_PREFIX_LENGTH
public static final int DEFAULT_MAX_EXPANSIONS
public static final boolean DEFAULT_TRANSPOSITIONS
@Deprecated
public FuzzyQueryBuilder(java.lang.String fieldName,
                                     java.lang.String value)
fieldName - The name of the fieldvalue - The value of the text@Deprecated
public FuzzyQueryBuilder(java.lang.String fieldName,
                                     int value)
fieldName - The name of the fieldvalue - The value of the text@Deprecated
public FuzzyQueryBuilder(java.lang.String fieldName,
                                     long value)
fieldName - The name of the fieldvalue - The value of the text@Deprecated
public FuzzyQueryBuilder(java.lang.String fieldName,
                                     float value)
fieldName - The name of the fieldvalue - The value of the text@Deprecated
public FuzzyQueryBuilder(java.lang.String fieldName,
                                     double value)
fieldName - The name of the fieldvalue - The value of the text@Deprecated
public FuzzyQueryBuilder(java.lang.String fieldName,
                                     boolean value)
fieldName - The name of the fieldvalue - The value of the text@Deprecated
public FuzzyQueryBuilder(java.lang.String fieldName,
                                     java.lang.Object value)
fieldName - The name of the fieldvalue - The value of the termpublic FuzzyQueryBuilder(StreamInput in) throws java.io.IOException
java.io.IOExceptionprotected void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo in class AbstractQueryBuilder<FuzzyQueryBuilder>java.io.IOExceptionpublic java.lang.String fieldName()
public java.lang.Object value()
public FuzzyQueryBuilder fuzziness(Fuzziness fuzziness)
public Fuzziness fuzziness()
public FuzzyQueryBuilder prefixLength(int prefixLength)
public int prefixLength()
public FuzzyQueryBuilder maxExpansions(int maxExpansions)
public int maxExpansions()
public FuzzyQueryBuilder transpositions(boolean transpositions)
public boolean transpositions()
public FuzzyQueryBuilder rewrite(java.lang.String rewrite)
public java.lang.String rewrite()
protected void doXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContent in class AbstractQueryBuilder<FuzzyQueryBuilder>java.io.IOExceptionpublic static java.util.Optional<FuzzyQueryBuilder> fromXContent(QueryParseContext parseContext) throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getWriteableName()
NamedWriteablegetWriteableName in interface NamedWriteableprotected org.apache.lucene.search.Query doToQuery(QueryShardContext context) throws java.io.IOException
doToQuery in class AbstractQueryBuilder<FuzzyQueryBuilder>java.io.IOExceptionprotected int doHashCode()
doHashCode in class AbstractQueryBuilder<FuzzyQueryBuilder>protected boolean doEquals(FuzzyQueryBuilder other)
AbstractQueryBuilderQueryBuilder object of the same type is "equal to" this one.doEquals in class AbstractQueryBuilder<FuzzyQueryBuilder>