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:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCreateIndexRequest.BuilderBuilder forCreateIndexRequest.Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<CreateIndexRequest>_DESERIALIZERJson deserializer forCreateIndexRequeststatic Endpoint<CreateIndexRequest,CreateIndexResponse,ErrorResponse>_ENDPOINTEndpoint "indices.create". -
Method Summary
Modifier and Type Method Description java.util.Map<java.lang.String,Alias>aliases()API name:aliasesjava.lang.BooleanincludeTypeName()Whether a type should be expected in the body of the mappings.java.lang.Stringindex()Required - The name of the indexTypeMappingmappings()Mapping for fields in the index.TimemasterTimeout()Specify timeout for connection to masterstatic CreateIndexRequestof(java.util.function.Function<CreateIndexRequest.Builder,ObjectBuilder<CreateIndexRequest>> fn)voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)IndexSettingssettings()API name:settingsprotected static voidsetupCreateIndexRequestDeserializer(ObjectDeserializer<CreateIndexRequest.Builder> op)Timetimeout()Explicit operation timeoutWaitForActiveShardswaitForActiveShards()Set the number of active shards to wait for before the operation returns.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
_DESERIALIZER
Json deserializer forCreateIndexRequest -
_ENDPOINT
Endpoint "indices.create".
-
-
Method Details
-
of
public static CreateIndexRequest of(java.util.function.Function<CreateIndexRequest.Builder,ObjectBuilder<CreateIndexRequest>> fn) -
aliases
API name:aliases -
includeTypeName
@Nullable public final java.lang.Boolean includeTypeName()Whether a type should be expected in the body of the mappings.API name:
include_type_name -
index
public final java.lang.String 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)
-