Class FuzzyQuery.Builder
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch._types.query_dsl.QueryBase.AbstractBuilder<FuzzyQuery.Builder>
org.opensearch.client.opensearch._types.query_dsl.FuzzyQuery.Builder
- All Implemented Interfaces:
CopyableBuilder<FuzzyQuery.Builder,,FuzzyQuery> MutableBuilder<FuzzyQuery.Builder,,FuzzyQuery> ObjectBuilder<FuzzyQuery>
- Enclosing class:
FuzzyQuery
public static class FuzzyQuery.Builder
extends QueryBase.AbstractBuilder<FuzzyQuery.Builder>
implements CopyableBuilder<FuzzyQuery.Builder,FuzzyQuery>
Builder for
FuzzyQuery.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aFuzzyQuery.copy()Create a new builderCopyableBuilderthat is a copy of this one.final FuzzyQuery.BuilderRequired - The target fieldfinal FuzzyQuery.BuilderAPI name:fuzzinessfinal FuzzyQuery.BuildermaxExpansions(Integer value) Maximum number of variations created.final FuzzyQuery.BuilderprefixLength(Integer value) Number of beginning characters left unchanged when creating expansions.final FuzzyQuery.BuilderAPI name:rewriteprotected FuzzyQuery.Builderself()final FuzzyQuery.Buildertranspositions(Boolean value) Indicates whether edits include transpositions of two adjacent characters (for example,abtoba).final FuzzyQuery.BuilderRequired - Term you wish to find in the provided field.final FuzzyQuery.Buildervalue(FieldValue value) Required - Term you wish to find in the provided field.Methods inherited from class org.opensearch.client.opensearch._types.query_dsl.QueryBase.AbstractBuilder
boost, queryNameMethods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _listCopy, _mapCopy, _mapPut, _mapPutAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.util.MutableBuilder
applyMutation
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
copy
Description copied from interface:CopyableBuilderCreate a new builderCopyableBuilderthat is a copy of this one.- Specified by:
copyin interfaceCopyableBuilder<FuzzyQuery.Builder,FuzzyQuery> - Returns:
- a new builder instance.
-
self
- Specified by:
selfin classQueryBase.AbstractBuilder<FuzzyQuery.Builder>
-
field
Required - The target field -
fuzziness
API name:fuzziness -
maxExpansions
Maximum number of variations created.API name:
max_expansions -
prefixLength
Number of beginning characters left unchanged when creating expansions.API name:
prefix_length -
rewrite
API name:rewrite -
transpositions
Indicates whether edits include transpositions of two adjacent characters (for example,abtoba).API name:
transpositions -
value
Required - Term you wish to find in the provided field.API name:
value -
value
@Nonnull public final FuzzyQuery.Builder value(Function<FieldValue.Builder, ObjectBuilder<FieldValue>> fn) Required - Term you wish to find in the provided field.API name:
value -
build
Builds aFuzzyQuery.- Specified by:
buildin interfaceObjectBuilder<FuzzyQuery>- Throws:
NullPointerException- if some of the required fields are null.
-