본문 바로가기
OpenSearch (ElasticSearch)

[API] Index APIs

by parkjp 2022. 3. 18.

 

1. Index Exist

Path and HTTP methods
HEAD /<index-name>

** https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/exists/

 

2. Delete Index

 

Path and HTTP methods
DELETE /<index-name>

** https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/delete-index/

 

3. Get Index

 

Path and HTTP methods
GET /<index-name>

** https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/get-index/

 

4. Close Index

 

Path and HTTP methods
POST /<index-name>/_close

** https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/close-index/

 

5. Open  Index

 

Path and HTTP methods
POST /<index-name>/_open

** https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/open-index/

 

6. Shrink Index

 

Path and HTTP methods
POST /<index-name>/_shrink/<target-index>

** https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/shrink-index/

 

7. Clone Index

 

Path and HTTP methods
POST /<source-index>/_clone/<target-index>
PUT /<source-index>/_clone/<target-index>

** https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/clone/

 

8. Split Index

 

Path and HTTP methods
POST /<source-index>/_split/<target-index>
PUT /<source-index>/_split/<target-index>

** https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/split/

반응형