Class CreateIndexRequest
- java.lang.Object
-
- org.opensearch.client.opensearch._types.RequestBase
-
- org.opensearch.client.opensearch.indices.CreateIndexRequest
-
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable public class CreateIndexRequest extends RequestBase implements JsonpSerializable
Creates an index with optional settings and mappings.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCreateIndexRequest.BuilderBuilder forCreateIndexRequest.-
Nested classes/interfaces inherited from class org.opensearch.client.opensearch._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
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Map<java.lang.String,Alias>aliases()API name:aliasesTimeclusterManagerTimeout()Specify timeout for connection to cluster-managerjava.lang.Stringindex()Required - The name of the indexTypeMappingmappings()Mapping for fields in the index.TimemasterTimeout()Deprecated.static 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.
-
-
-
Field Detail
-
_DESERIALIZER
public static final JsonpDeserializer<CreateIndexRequest> _DESERIALIZER
Json deserializer forCreateIndexRequest
-
_ENDPOINT
public static final Endpoint<CreateIndexRequest,CreateIndexResponse,ErrorResponse> _ENDPOINT
Endpoint "indices.create".
-
-
Method Detail
-
of
public static CreateIndexRequest of(java.util.function.Function<CreateIndexRequest.Builder,ObjectBuilder<CreateIndexRequest>> fn)
-
aliases
public final java.util.Map<java.lang.String,Alias> aliases()
API name:aliases
-
index
public final java.lang.String index()
Required - The name of the indexAPI name:
index
-
mappings
@Nullable public final TypeMapping mappings()
Mapping for fields in the index. If specified, this mapping can include:- Field names
- Field data types
- Mapping parameters
API name:
mappings
-
masterTimeout
@Deprecated @Nullable public final Time masterTimeout()
Deprecated.Specify timeout for connection to masterAPI name:
master_timeout
-
clusterManagerTimeout
@Nullable public final Time clusterManagerTimeout()
Specify timeout for connection to cluster-managerAPI name:
cluster_manager_timeout
-
settings
@Nullable public final IndexSettings settings()
API name:settings
-
timeout
@Nullable public final Time timeout()
Explicit operation timeoutAPI name:
timeout
-
waitForActiveShards
@Nullable public final WaitForActiveShards waitForActiveShards()
Set the number of active shards to wait for before the operation returns.API name:
wait_for_active_shards
-
serialize
public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
-
setupCreateIndexRequestDeserializer
protected static void setupCreateIndexRequestDeserializer(ObjectDeserializer<CreateIndexRequest.Builder> op)
-
-