BodyRequired
- mappings_override
object Hide mappings_override attributes Show mappings_override attributes object
- all_field
object Hide all_field attributes Show all_field attributes object
- analyzer
string Required - enabled
boolean Required - omit_norms
boolean Required - search_analyzer
string Required - similarity
string Required - store
boolean Required - store_term_vector_offsets
boolean Required - store_term_vector_payloads
boolean Required - store_term_vector_positions
boolean Required - store_term_vectors
boolean Required
- date_detection
boolean - dynamic
string Values are
strict
,runtime
,true
, orfalse
. - dynamic_date_formats
array[string] - dynamic_templates
array[object] - _field_names
object Hide _field_names attribute Show _field_names attribute object
- enabled
boolean Required
- index_field
object Hide index_field attribute Show index_field attribute object
- enabled
boolean Required
- _meta
object Hide _meta attribute Show _meta attribute object
- *
object Additional properties
- numeric_detection
boolean - properties
object - _routing
object Hide _routing attribute Show _routing attribute object
- required
boolean Required
- _size
object Hide _size attribute Show _size attribute object
- enabled
boolean Required
- _source
object - runtime
object Hide runtime attribute Show runtime attribute object
- *
object Additional properties Hide * attributes Show * attributes object
- fields
object For type
composite
- fetch_fields
array[object] For type
lookup
- format
string A custom format for
date
type runtime fields. - input_field
string Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
- target_field
string Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
- target_index
string - script
object Hide script attributes Show script attributes object
source
string | object One of: Hide attributes Show attributes
- aggregations
object Defines the aggregations that are run as part of the search request.
- collapse
object - explain
boolean If
true
, the request returns detailed information about score computation as part of a hit. - ext
object Configuration of search extensions defined by Elasticsearch plugins.
- from
number The starting document offset, which must be non-negative. By default, you cannot page through more than 10,000 hits using the
from
andsize
parameters. To page through more hits, use thesearch_after
parameter. - track_total_hits
boolean | number Number of hits matching the query to count accurately. If true, the exact number of hits is returned at the cost of some performance. If false, the response does not include the total number of hits matching the query. Defaults to 10,000 hits.
- indices_boost
array[object] Boost the
_score
of documents from specified indices. The boost value is the factor by which scores are multiplied. A boost value greater than1.0
increases the score. A boost value between0
and1.0
decreases the score. - docvalue_fields
array[object] An array of wildcard (
*
) field patterns. The request returns doc values for field names matching these patterns in thehits.fields
property of the response. - rank
object - min_score
number The minimum
_score
for matching documents. Documents with a lower_score
are not included in search results or results collected by aggregations. - post_filter
object An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
- profile
boolean Set to
true
to return detailed timing information about the execution of individual components in a search request. NOTE: This is a debugging tool and adds significant overhead to search execution. - query
object An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
- retriever
object - script_fields
object Retrieve a script evaluation (based on different fields) for each hit.
- search_after
array[number | string | boolean | null] A field value.
- size
number The number of hits to return, which must not be negative. By default, you cannot page through more than 10,000 hits using the
from
andsize
parameters. To page through more hits, use thesearch_after
property. - slice
object - fields
array[object] An array of wildcard (
*
) field patterns. The request returns values for field names matching these patterns in thehits.fields
property of the response. - suggest
object - terminate_after
number The maximum number of documents to collect for each shard. If a query reaches this limit, Elasticsearch terminates the query early. Elasticsearch collects documents before sorting.
IMPORTANT: Use with caution. Elasticsearch applies this property to each shard handling the request. When possible, let Elasticsearch perform early termination automatically. Avoid specifying this property for requests that target data streams with backing indices across multiple data tiers.
If set to
0
(default), the query does not terminate early. - timeout
string The period of time to wait for a response from each shard. If no response is received before the timeout expires, the request fails and returns an error. Defaults to no timeout.
- track_scores
boolean If
true
, calculate and return document scores, even if the scores are not used for sorting. - version
boolean If
true
, the request returns the document version as part of a hit. - seq_no_primary_term
boolean If
true
, the request returns sequence number and primary term of the last modification of each hit. - stored_fields
string | array[string] - pit
object - runtime_mappings
object - stats
array[string] The stats groups to associate with the search. Each group maintains a statistics aggregation for its associated searches. You can retrieve these stats using the indices stats API.
- id
string - params
object Specifies any named parameters that are passed into the script as variables. Use parameters instead of hard-coded values to decrease compile time.
Hide params attribute Show params attribute object
- *
object Additional properties
- options
object Hide options attribute Show options attribute object
- *
string Additional properties
- type
string Required Values are
boolean
,composite
,date
,double
,geo_point
,geo_shape
,ip
,keyword
,long
, orlookup
.
- enabled
boolean - subobjects
string Values are
true
orfalse
. - _data_stream_timestamp
object Hide _data_stream_timestamp attribute Show _data_stream_timestamp attribute object
- enabled
boolean Required
- settings_override
object Index settings - remove_index_blocks
boolean If index blocks should be removed when creating destination index (optional)
Responses
- 200 application/json
Hide response attributes Show response attributes object
- acknowledged
boolean Required - index
string Required - shards_acknowledged
boolean Required
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"