joonsei
Hello, world!
joonsei
전체 방문자
오늘
어제
  • 분류 전체보기 (32)
    • nodejs (7)
    • javascript (3)
    • Elasticsearch (11)
    • Electron (1)
    • oracle (1)
    • etc (7)
    • MongoDB (1)

인기 글

최근 댓글

최근 글

joonsei
Elasticsearch

index illegal_argument_exception

2022. 6. 30. 11:59

Elasticsearch 에서 Index 삭제 시, Wildcard 로 요청하면,
--> Wildcard expressions or all indices are not allowed 에러가 발생하면서 삭제가 안됨.

curl -XDELETE "localhost:9200/<indexName*>"
{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "Wildcard expressions or all indices are not allowed"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "Wildcard expressions or all indices are not allowed"
  },
  "status" : 400
}

 

Elasticsaearch 의 action.destructive_requires_name 값을 false 로 바꿔줘야함.

curl -XPUT "localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d '
{
  "transient": {
	"action.destructive_requires_name":false
  }
}
'


curl -XDELETE "localhost:9200/<indexName*>"
{
  "acknowledged": true
}

 

저작자표시 (새창열림)
    'Elasticsearch' 카테고리의 다른 글
    • Elasticsearch Dynamic Templates
    • Elasticsearch function_score 스코어 계산
    • Document 데이터 전체 수정
    • 조건에 따른 특정 Document 데이터 수정
    joonsei
    joonsei
    IT 개발자의 소소한 기술 이야기.

    티스토리툴바