Class CompletionContext.Builder
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch.core.search.CompletionContext.Builder
- All Implemented Interfaces:
CopyableBuilder<CompletionContext.Builder,,CompletionContext> MutableBuilder<CompletionContext.Builder,,CompletionContext> ObjectBuilder<CompletionContext>
- Enclosing class:
CompletionContext
public static class CompletionContext.Builder
extends ObjectBuilderBase
implements CopyableBuilder<CompletionContext.Builder,CompletionContext>
Builder for
CompletionContext.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAPI name:boostbuild()Builds aCompletionContext.Required - API name:contextRequired - API name:contextcopy()Create a new builderCopyableBuilderthat is a copy of this one.API name:neighboursneighbours(List<GeoHashPrecision> list) API name:neighboursneighbours(GeoHashPrecision value, GeoHashPrecision... values) API name:neighboursAPI name:precisionprecision(GeoHashPrecision value) API name:precisionAPI name:prefixMethods 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<CompletionContext.Builder,CompletionContext> - Returns:
- a new builder instance.
-
boost
API name:boost -
context
Required - API name:context -
context
@Nonnull public final CompletionContext.Builder context(Function<Context.Builder, ObjectBuilder<Context>> fn) Required - API name:context -
neighbours
API name:neighboursAdds all elements of
listtoneighbours. -
neighbours
@Nonnull public final CompletionContext.Builder neighbours(GeoHashPrecision value, GeoHashPrecision... values) API name:neighboursAdds one or more values to
neighbours. -
neighbours
@Nonnull public final CompletionContext.Builder neighbours(Function<GeoHashPrecision.Builder, ObjectBuilder<GeoHashPrecision>> fn) API name:neighboursAdds a value to
neighboursusing a builder lambda. -
precision
API name:precision -
precision
@Nonnull public final CompletionContext.Builder precision(Function<GeoHashPrecision.Builder, ObjectBuilder<GeoHashPrecision>> fn) API name:precision -
prefix
API name:prefix -
build
Builds aCompletionContext.- Specified by:
buildin interfaceObjectBuilder<CompletionContext>- Throws:
NullPointerException- if some of the required fields are null.
-