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 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()API name:aliasesfinal BooleanWhether a type should be expected in the body of the mappings.final Stringindex()Required - The name of the indexfinal TypeMappingmappings()Mapping for fields in the index.final TimeSpecify timeout for connection to masterstatic CreateIndexRequestvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) final IndexSettingssettings()API name:settingsprotected static voidfinal Timetimeout()Explicit operation timeoutfinal WaitForActiveShardsSet 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:
serializein interfaceJsonpSerializable
-
serializeInternal
-
setupCreateIndexRequestDeserializer
protected static void setupCreateIndexRequestDeserializer(ObjectDeserializer<CreateIndexRequest.Builder> op)
-