
PUT /my_index : 새로운 Index 생성
HEAD /my_index : Index 존재 여부 확인
GET /my_index : Index 정보 조회
DELETE /my_index : Index 삭제
POST /my_index/_doc : Index에 문서 삽입(생성)
POST /my_index/_doc { "title": "First Document", "views": 100 }
GET /my_index/_doc/{id} : 문서 조회
GET /my_index/_doc/1
POST /my_index/_update/{id} : 문서 수정
POST /my_index/_update/1 { "doc": { "views": 150 } }
DELETE /my_index/_doc/{id} : 문서 삭제
DELETE /my_index/_doc/1
GET /my_index/_search
- Match 검색
GET /my_index/_search { "query": { "match": { "title": "Document" } } }- Term 검색
GET /my_index/_search { "query": { "term": { "views": 100 } } }- Range 검색
GET /my_index/_search { "query": { "range": { "views": { "gte": 50, "lte": 200 } } } }- Bool Query (AND, OR, NOT 조합)
GET /my_index/_search { "query": { "bool": { "must": [ { "match": { "title": "Document" } }, { "range": { "views": { "gte": 100 } } } ], "must_not": [ { "term": { "views": 300 } } ] } } }- Aggregation (집계)
GET /my_index/_search { "size": 0, "aggs": { "avg_views": { "avg": { "field": "views" } } } }
PUT /my_index : 매핑 생성
PUT /my_index { "mappings": { "properties": { "title": { "type": "text" }, "views": { "type": "integer" } } } }
GET /my_index/_mapping : 매핑 조회
GET /my_index/_mapping
GET /my_index/_settings : 인덱스 설정 조회
GET /my_index/_settings
PUT /my_index/_settings : 인덱스 설정 변경
PUT /my_index/_settings { "index": { "number_of_replicas": 2 } }
POST /_bulk : 여러 문서 일괄 삽입/갱신/삭제POST /_bulk { "index": { "_index": "my_index", "_id": "1" } } { "title": "Doc1", "views": 10 } { "index": { "_index": "my_index", "_id": "2" } } { "title": "Doc2", "views": 20 }
GET /my_index/_search?scroll=1m : 첫 페이지 요청
GET /my_index/_search?scroll=1m { "size": 2, "query": { "match_all": {} } }
GET /_search/scroll : 다음 페이지 요청
GET /_search/scroll { "scroll": "1m", "scroll_id": "{SCROLL_ID}" }
GET /my_index/_count : 문서 개수 조회GET /my_index/_count { "query": { "match": { "title": "Document" } } }
POST /my_index/_delete_by_query : 조건에 맞는 문서 일괄 삭제POST /my_index/_delete_by_query { "query": { "range": { "views": { "lte": 10 } } } }
POST /my_index/_update_by_query : 조건에 맞는 문서 일괄 업데이트POST /my_index/_update_by_query { "script": { "source": "ctx._source.views += 1", "lang": "painless" }, "query": { "match_all": {} } }
POST /_reindex : 인덱스 데이터 복사POST /_reindex { "source": { "index": "old_index" }, "dest": { "index": "new_index" } }
GET /_cat/indices?v : 인덱스 리스트 조회
GET /_cat/nodes?v : 노드 상태 조회
GET /_cat/health?v : 클러스터 상태 조회
GET /_cluster/health : 클러스터 헬스체크GET /_cluster/health
POST /_aliases : 별칭 추가
POST /_aliases { "actions": [ { "add": { "index": "my_index", "alias": "my_alias" } } ] }
GET /_alias/{alias} : 별칭 정보 조회
GET /_alias/my_alias