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

인기 글

최근 댓글

최근 글

joonsei
Elasticsearch

조건에 따른 특정 Document 데이터 삭제

2022. 5. 17. 10:36
# 1341번 게시글 삭제
curl -XPOST "localhost:9200/board-202205/_delete_by_query" -H 'Content-Type: application/json' -d '
{
    "query": {
        "match": {
            "_id": "1341"
        }
    }
}
'

# writer 필드가 없는 게시글 일괄 삭제
curl -XPOST "localhost:9200/board-202205/_delete_by_query" -H 'Content-Type: application/json' -d '
{
  "query": {
    "bool": {
      "must_not": {
        "exists": {
          "field": "writer"
        }
      }
    }
  }
}
'

 

저작자표시 (새창열림)
    'Elasticsearch' 카테고리의 다른 글
    • Document 데이터 전체 수정
    • 조건에 따른 특정 Document 데이터 수정
    • [Elasticsearch] monitoring execution failed 오류
    • Elasticsearch Cluster 재기동, Rolling restart
    joonsei
    joonsei
    IT 개발자의 소소한 기술 이야기.

    티스토리툴바