OpenSearch/docs/reference/indices.asciidoc

109 lines
2.0 KiB
Plaintext
Raw Normal View History

[[indices]]
= Indices APIs
[partintro]
--
The indices APIs are used to manage individual indices,
index settings, aliases, mappings, and index templates.
[float]
[[index-management]]
== Index management:
* <<indices-create-index>>
* <<indices-delete-index>>
* <<indices-get-index>>
* <<indices-exists>>
* <<indices-open-close>>
Add primitive to shrink an index into a single shard (#18270) This adds a low level primitive operations to shrink an existing index into a new index with a single shard. This primitive expects all shards of the source index to allocated on a single node. Once the target index is initializing on the shrink node it takes a snapshot of the source index shards and copies all files into the target indices data folder. An [optimization](https://issues.apache.org/jira/browse/LUCENE-7300) coming in Lucene 6.1 will also allow for optional constant time copy if hard-links are supported by the filesystem. All mappings are merged into the new indexes metadata once the snapshots have been taken on the merge node. To shrink an existing index all shards must be moved to a single node (one instance of each shard) and the index must be read-only: ```BASH $ curl -XPUT 'http://localhost:9200/logs/_settings' -d '{ "settings" : { "index.routing.allocation.require._name" : "shrink_node_name", "index.blocks.write" : true } } ``` once all shards are started on the shrink node. the new index can be created via: ```BASH $ curl -XPUT 'http://localhost:9200/logs/_shrink/logs_single_shard' -d '{ "settings" : { "index.codec" : "best_compression", "index.number_of_replicas" : 1 } }' ``` This API will perform all needed check before the new index is created and selects the shrink node based on the allocation of the source index. This call returns immediately, to monitor shrink progress the recovery API should be used since all copy operations are reflected in the recovery API with byte copy progress etc. The shrink operation does not modify the source index, if a shrink operation should be canceled or if the shrink failed, the target index can simply be deleted and all resources are released.
2016-05-31 04:41:44 -04:00
* <<indices-shrink-index>>
2016-06-08 18:32:22 -04:00
* <<indices-rollover-index>>
[float]
[[mapping-management]]
== Mapping management:
* <<indices-put-mapping>>
* <<indices-get-mapping>>
* <<indices-get-field-mapping>>
* <<indices-types-exists>>
[float]
[[alias-management]]
== Alias management:
* <<indices-aliases>>
[float]
[[index-settings]]
== Index settings:
* <<indices-update-settings>>
* <<indices-get-settings>>
* <<indices-analyze>>
* <<indices-templates>>
[float]
[[monitoring]]
== Monitoring:
* <<indices-stats>>
* <<indices-segments>>
* <<indices-recovery>>
* <<indices-shards-stores>>
[float]
[[status-management]]
== Status management:
* <<indices-clearcache>>
* <<indices-refresh>>
* <<indices-flush>>
* <<indices-forcemerge>>
--
include::indices/create-index.asciidoc[]
include::indices/delete-index.asciidoc[]
include::indices/get-index.asciidoc[]
include::indices/indices-exists.asciidoc[]
include::indices/open-close.asciidoc[]
2016-05-31 05:50:50 -04:00
include::indices/shrink-index.asciidoc[]
2016-06-17 12:14:45 -04:00
include::indices/rollover-index.asciidoc[]
include::indices/put-mapping.asciidoc[]
include::indices/get-mapping.asciidoc[]
include::indices/get-field-mapping.asciidoc[]
include::indices/types-exists.asciidoc[]
include::indices/aliases.asciidoc[]
include::indices/update-settings.asciidoc[]
include::indices/get-settings.asciidoc[]
include::indices/analyze.asciidoc[]
include::indices/templates.asciidoc[]
include::indices/stats.asciidoc[]
include::indices/segments.asciidoc[]
include::indices/recovery.asciidoc[]
include::indices/shard-stores.asciidoc[]
include::indices/clearcache.asciidoc[]
include::indices/flush.asciidoc[]
include::indices/refresh.asciidoc[]
include::indices/forcemerge.asciidoc[]