Class CreateIndexRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.indices.CreateIndexRequest
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class CreateIndexRequest
extends RequestBase
implements JsonpSerializable
Creates a new index.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<CreateIndexRequest>Json deserializer forCreateIndexRequeststatic final Endpoint<CreateIndexRequest,CreateIndexResponse, ErrorResponse> Endpoint "indices.create". -
Method Summary
Modifier and TypeMethodDescriptionaliases()Aliases for the index.final Stringindex()Required - Name of the index you wish to create.final TypeMappingmappings()Mapping for fields in the index.final TimePeriod to wait for a connection to the master node.static CreateIndexRequestvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) final IndexSettingssettings()Configuration options for the index.protected static voidfinal Timetimeout()Period to wait for a response.final WaitForActiveShardsThe number of shard copies that must be active before proceeding with the operation.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forCreateIndexRequest -
_ENDPOINT
Endpoint "indices.create".
-
-
Method Details
-
of
public static CreateIndexRequest of(Function<CreateIndexRequest.Builder, ObjectBuilder<CreateIndexRequest>> fn) -
aliases
Aliases for the index.API name:
aliases -
index
Required - Name of the index you wish to create.API name:
index -
mappings
Mapping for fields in the index. If specified, this mapping can include:- Field names
- Field data types
- Mapping parameters
API name:
mappings -
masterTimeout
Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.API name:
master_timeout -
settings
Configuration options for the index.API name:
settings -
timeout
Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.API name:
timeout -
waitForActiveShards
The number of shard copies that must be active before proceeding with the operation. Set toallor any positive integer up to the total number of shards in the index (number_of_replicas+1).API name:
wait_for_active_shards -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
setupCreateIndexRequestDeserializer
protected static void setupCreateIndexRequestDeserializer(ObjectDeserializer<CreateIndexRequest.Builder> op)
-