Create an index from a source index
Technical preview; Added in 8.18.0
Copy the mappings and settings from the source index to a destination index while allowing request settings and mappings to override the source values.
Body
Required
-
mappings_override
object -
settings_override
object Index settings -
remove_index_blocks
boolean If index blocks should be removed when creating destination index (optional)
POST
/_create_from/{source}/{dest}
Console
POST _create_from/my-index/my-new-index
resp = client.perform_request(
"POST",
"/_create_from/my-index/my-new-index",
)
const response = await client.transport.request({
method: "POST",
path: "/_create_from/my-index/my-new-index",
});
response = client.perform_request(
"POST",
"/_create_from/my-index/my-new-index",
{},
)
$requestFactory = Psr17FactoryDiscovery::findRequestFactory();
$request = $requestFactory->createRequest(
"POST",
"/_create_from/my-index/my-new-index",
);
$resp = $client->sendRequest($request);
curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_create_from/my-index/my-new-index"