Class CreateRequest.Builder<TDocument>
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch.core.CreateRequest.Builder<TDocument>
- All Implemented Interfaces:
ObjectBuilder<CreateRequest<TDocument>>
- Enclosing class:
CreateRequest<TDocument>
public static class CreateRequest.Builder<TDocument>
extends ObjectBuilderBase
implements ObjectBuilder<CreateRequest<TDocument>>
Builder for
CreateRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aCreateRequest.final CreateRequest.Builder<TDocument> Required - Request body.final CreateRequest.Builder<TDocument> Required - Document IDfinal CreateRequest.Builder<TDocument> Required - The name of the indexfinal CreateRequest.Builder<TDocument> The pipeline id to preprocess incoming documents withfinal CreateRequest.Builder<TDocument> Iftruethen refresh the affected shards to make this operation visible to search, ifwait_forthen wait for a refresh to make this operation visible to search, iffalse(the default) then do nothing with refreshes.final CreateRequest.Builder<TDocument> Specific routing valuefinal CreateRequest.Builder<TDocument> Serializer for TDocument.final CreateRequest.Builder<TDocument> Explicit operation timeoutfinal CreateRequest.Builder<TDocument> Explicit operation timeoutfinal CreateRequest.Builder<TDocument> Explicit version number for concurrency controlfinal CreateRequest.Builder<TDocument> versionType(VersionType value) Specific version typefinal CreateRequest.Builder<TDocument> Sets the number of shard copies that must be active before proceeding with the index operation.final CreateRequest.Builder<TDocument> Sets the number of shard copies that must be active before proceeding with the index operation.Methods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _listCopy, _mapCopy, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
id
Required - Document IDAPI name:
id -
index
Required - The name of the indexAPI name:
index -
pipeline
The pipeline id to preprocess incoming documents withAPI name:
pipeline -
refresh
Iftruethen refresh the affected shards to make this operation visible to search, ifwait_forthen wait for a refresh to make this operation visible to search, iffalse(the default) then do nothing with refreshes.API name:
refresh -
routing
Specific routing valueAPI name:
routing -
timeout
Explicit operation timeoutAPI name:
timeout -
timeout
public final CreateRequest.Builder<TDocument> timeout(Function<Time.Builder, ObjectBuilder<Time>> fn) Explicit operation timeoutAPI name:
timeout -
version
Explicit version number for concurrency controlAPI name:
version -
versionType
Specific version typeAPI name:
version_type -
waitForActiveShards
public final CreateRequest.Builder<TDocument> waitForActiveShards(@Nullable WaitForActiveShards value) Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set toallfor all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)API name:
wait_for_active_shards -
waitForActiveShards
public final CreateRequest.Builder<TDocument> waitForActiveShards(Function<WaitForActiveShards.Builder, ObjectBuilder<WaitForActiveShards>> fn) Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set toallfor all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)API name:
wait_for_active_shards -
document
Required - Request body.API name:
_value_body -
tDocumentSerializer
public final CreateRequest.Builder<TDocument> tDocumentSerializer(@Nullable JsonpSerializer<TDocument> value) Serializer for TDocument. If not set, an attempt will be made to find a serializer from the JSON context. -
build
Builds aCreateRequest.- Specified by:
buildin interfaceObjectBuilder<TDocument>- Throws:
NullPointerException- if some of the required fields are null.
-