2.X/1. Getting Started

1-10-02. Deleting an Index

drscg 2017. 9. 30. 17:29

To delete an index, use the following request:

index를 삭제하기 위해서, 아래 request를 사용한다.

DELETE /my_index

You can delete multiple indices with this:

아래와 같이, 다수의 indices를 지울 수도 있다.

DELETE /index_one,index_two
DELETE /index_*

You can even delete all indices with this:

_모든_ indices를 지울 수도 있다.

DELETE /_all
DELETE /*
Note

For some, the ability to delete all your data with a single command is a very scary prospect. If you want to eliminate the possibility of an accidental mass-deletion, you can set the following to true in your elasticsearch.yml:

어떤 경우에, 단일 명령어로 모든 데이터를 삭제하는 기능은 매우 무서운 결과일 수 있다. 돌발적인 대량 삭제의 가능성을 없애려면, elasticsearch.yml에 다음과 같이 true로 설정할 수 있다.

action.destructive_requires_name: true

This restricts deletions to specific names, instead of allowing the special _all or wildcard options. You can also update this setting dynamically through the Cluster State API

이것은 특수한 _all 이나 wildcard option을 허용하는 대신, 특별한 이름을 가진 삭제를 제한한다. 이것을 Cluster State API를 통해 동적으로 설정하여 update할 수도 있다.


'2.X > 1. Getting Started' 카테고리의 다른 글

1-10. Index Management  (0) 2017.09.30
1-10-01. Creating an Index  (0) 2017.09.30
1-10-03. Index Settings  (0) 2017.09.30
1-10-04. Configuring Analyzers  (0) 2017.09.30
1-10-05. Custom Analyzers  (0) 2017.09.30