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 class
CreateIndexRequest.Builder
Builder 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>
_DESERIALIZER
Json deserializer forCreateIndexRequest
static Endpoint<CreateIndexRequest,CreateIndexResponse,ErrorResponse>
_ENDPOINT
Endpoint "indices.create
". -
Method Summary
Modifier and Type Method Description java.util.Map<java.lang.String,Alias>
aliases()
API name:aliases
java.lang.Boolean
includeTypeName()
Whether a type should be expected in the body of the mappings.java.lang.String
index()
Required - The name of the indexTypeMapping
mappings()
Mapping for fields in the index.Time
masterTimeout()
Specify timeout for connection to masterstatic CreateIndexRequest
of(java.util.function.Function<CreateIndexRequest.Builder,ObjectBuilder<CreateIndexRequest>> fn)
void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
Serialize this object to JSON.protected void
serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
IndexSettings
settings()
API name:settings
protected static void
setupCreateIndexRequestDeserializer(ObjectDeserializer<CreateIndexRequest.Builder> op)
Time
timeout()
Explicit operation timeoutWaitForActiveShards
waitForActiveShards()
Set the number of active shards to wait for before the operation returns.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupCreateIndexRequestDeserializer
protected static void setupCreateIndexRequestDeserializer(ObjectDeserializer<CreateIndexRequest.Builder> op)
-