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 an index with optional settings and mappings.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JsonpDeserializer<CreateIndexRequest>
Json deserializer forCreateIndexRequest
static final Endpoint<CreateIndexRequest,
CreateIndexResponse, ErrorResponse> Endpoint "indices.create
". -
Method Summary
Modifier and TypeMethodDescriptionaliases()
API name:aliases
final Boolean
Whether a type should be expected in the body of the mappings.final String
index()
Required - The name of the indexfinal TypeMapping
mappings()
Mapping for fields in the index.final Time
Specify timeout for connection to masterstatic CreateIndexRequest
void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) final IndexSettings
settings()
API name:settings
protected static void
final Time
timeout()
Explicit operation timeoutfinal WaitForActiveShards
Set the number of active shards to wait for before the operation returns.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
API name:aliases
-
includeTypeName
Whether a type should be expected in the body of the mappings.API name:
include_type_name
-
index
Required - The name of the indexAPI 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
Specify timeout for connection to masterAPI name:
master_timeout
-
settings
API name:settings
-
timeout
Explicit operation timeoutAPI name:
timeout
-
waitForActiveShards
Set the number of active shards to wait for before the operation returns.API name:
wait_for_active_shards
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupCreateIndexRequestDeserializer
protected static void setupCreateIndexRequestDeserializer(ObjectDeserializer<CreateIndexRequest.Builder> op)
-