Class CompletionSuggestOption.Builder<TDocument>
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch.core.search.CompletionSuggestOption.Builder<TDocument>
- All Implemented Interfaces:
CopyableBuilder<CompletionSuggestOption.Builder<TDocument>,,CompletionSuggestOption<TDocument>> MutableBuilder<CompletionSuggestOption.Builder<TDocument>,,CompletionSuggestOption<TDocument>> ObjectBuilder<CompletionSuggestOption<TDocument>>
- Enclosing class:
CompletionSuggestOption<TDocument>
public static class CompletionSuggestOption.Builder<TDocument>
extends ObjectBuilderBase
implements CopyableBuilder<CompletionSuggestOption.Builder<TDocument>,CompletionSuggestOption<TDocument>>
Builder for
CompletionSuggestOption.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aCompletionSuggestOption.collateMatch(Boolean value) API name:collate_matchAPI name:contextsAPI name:contextscopy()Create a new builderCopyableBuilderthat is a copy of this one.API name:fieldsAPI name:fieldsAPI name:_idAPI name:_indexAPI name:_routingAPI name:_scoreAPI name:_sourceSerializer forTDocument.Required - API name:textMethods 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<CompletionSuggestOption.Builder<TDocument>,CompletionSuggestOption<TDocument>> - Returns:
- a new builder instance.
-
collateMatch
@Nonnull public final CompletionSuggestOption.Builder<TDocument> collateMatch(@Nullable Boolean value) API name:collate_match -
contexts
@Nonnull public final CompletionSuggestOption.Builder<TDocument> contexts(Map<String, List<Context>> map) API name:contextsAdds all elements of
maptocontexts. -
contexts
@Nonnull public final CompletionSuggestOption.Builder<TDocument> contexts(String key, List<Context> value) API name:contextsAdds an entry to
contexts. -
fields
API name:fieldsAdds all elements of
maptofields. -
fields
API name:fieldsAdds an entry to
fields. -
id
API name:_id -
index
API name:_index -
routing
API name:_routing -
score
API name:_score -
source
API name:_source -
tDocumentSerializer
@Nonnull public final CompletionSuggestOption.Builder<TDocument> tDocumentSerializer(@Nullable JsonpSerializer<TDocument> value) Serializer forTDocument. If not set, an attempt will be made to find a serializer from the JSON context. -
text
Required - API name:text -
build
Builds aCompletionSuggestOption.- Specified by:
buildin interfaceObjectBuilder<TDocument>- Throws:
NullPointerException- if some of the required fields are null.
-