GET /_cluster/health | 클러스터 상태 |
GET /_cluster/state | 클러스터 상태 정보 |
GET /_cluster/stats | 클러스터 통계 |
GET /_nodes | 노드 정보 |
GET /_nodes/stats | 노드 통계 |
GET /_cat/nodes?v | 노드 개요 (표) |
GET /_cat/indices?v | 모든 인덱스 목록 |
PUT /index_name | 인덱스 생성 |
DELETE /index_name | 인덱스 삭제 |
POST /index_name/_close | 인덱스 닫기 |
POST /index_name/_open | 인덱스 열기 |
GET /index_name/_settings | 인덱스 설정 조회 |
GET /index_name/_mapping | 매핑 조회 |
PUT /index_name { "settings": { "number_of_shards": 3, "number_of_replicas": 1 } } | 설정과 함께 생성 |
PUT /index_name/_settings { "number_of_replicas": 2 } | 설정 업데이트 |
POST /index_name/_refresh | 인덱스 새로고침 |
POST /index_name/_flush | 인덱스 플러시 |
POST /index_name/_forcemerge | 세그먼트 강제 병합 |
PUT /index_name { "mappings": { "properties": { "field": { "type": "text" } } } } | 매핑과 함께 인덱스 생성 |
PUT /index_name/_mapping { "properties": { "new_field": { "type": "keyword" } } } | 매핑에 필드 추가 |
"type": "text" | 전문 검색 가능 |
"type": "keyword" | 정확한 값, 집계용 |
"type": "long", "integer", "short", "byte" | 정수 타입 |
"type": "double", "float" | 실수 타입 |
"type": "boolean" | 불리언 |
"type": "date" | 날짜/시간 |
"type": "object" | JSON 객체 |
"type": "nested" | 중첩 객체 (배열) |
"type": "geo_point" | 위도/경도 포인트 |
POST /index/_doc { "field": "value" } | 문서 생성 (자동 ID) |
PUT /index/_doc/1 { "field": "value" } | ID로 생성/업데이트 |
POST /index/_create/1 { "field": "value" } | 생성만 (존재 시 실패) |
POST /index/_bulk | 벌크 문서 인덱싱 |
GET /index/_doc/1 | ID로 문서 조회 |
GET /index/_source/1 | 소스만 조회 |
HEAD /index/_doc/1 | 존재 여부 확인 |
GET /index/_mget { "ids": ["1", "2"] } | 여러 문서 조회 |
POST /index/_update/1 { "doc": { "field": "new_value" } } | 부분 업데이트 |
POST /index/_update/1 { "script": { "source": "ctx._source.count += 1" } } | 스크립트로 업데이트 |
DELETE /index/_doc/1 | 문서 삭제 |
POST /index/_delete_by_query { "query": { "match": { "field": "value" } } } | 쿼리로 삭제 |
POST /index/_update_by_query { "query": {...}, "script": {...} } | 쿼리로 업데이트 |
GET /index/_search | 모든 문서 검색 |
GET /index/_search?q=field:value | URI 검색 |
GET /index/_search { "query": { "match_all": {} } } | 모두 매칭 |
GET /index/_search { "query": { "match": { "field": "text" } } } | 전문 매칭 |
GET /index/_search { "query": { "term": { "status": "active" } } } | 정확한 용어 매칭 |
{ "match": { "field": "search text" } } | 전문 검색 |
{ "match_phrase": { "field": "exact phrase" } } | 구문 매칭 |
{ "multi_match": { "query": "text", "fields": ["f1", "f2"] } } | 다중 필드 검색 |
{ "term": { "status": "active" } } | 정확한 용어 |
{ "terms": { "status": ["active", "pending"] } } | 다중 용어 |
{ "range": { "age": { "gte": 18, "lte": 65 } } } | 범위 쿼리 |
{ "exists": { "field": "email" } } | 필드 존재 |
{ "prefix": { "name": "Jo" } } | 접두사 매칭 |
{ "wildcard": { "name": "Jo*n" } } | 와일드카드 매칭 |
{ "fuzzy": { "name": { "value": "john", "fuzziness": "AUTO" } } } | 퍼지 매칭 |
{ "bool": { "must": [...], "should": [...], "must_not": [...], "filter": [...] } } | 불리언 쿼리 |
"must": [query1, query2] | AND - 모두 매칭 필수 |
"should": [query1, query2] | OR - 최소 하나 |
"must_not": [query] | NOT - 매칭되면 안 됨 |
"filter": [query] | 필터 (점수 없음) |
{ "from": 0, "size": 10 } | 페이지네이션 |
{ "sort": [{ "date": "desc" }] } | 결과 정렬 |
{ "sort": [{ "date": "desc" }, "_score"] } | 다중 필드 정렬 |
{ "_source": ["field1", "field2"] } | 필드 선택 |
{ "_source": false } | 소스 제외 |
{ "highlight": { "fields": { "content": {} } } } | 매칭 하이라이트 |
{ "highlight": { "pre_tags": ["<em>"], "post_tags": ["</em>"], "fields": {...} } } | 커스텀 하이라이트 태그 |
{ "aggs": { "avg_price": { "avg": { "field": "price" } } } } | 평균 |
{ "aggs": { "total": { "sum": { "field": "amount" } } } } | 합계 |
{ "aggs": { "stats": { "stats": { "field": "price" } } } } | 통계 (최소, 최대, 평균, 합계, 개수) |
{ "aggs": { "unique_users": { "cardinality": { "field": "user_id" } } } } | 고유 개수 |
{ "aggs": { "by_status": { "terms": { "field": "status" } } } } | 용어별 그룹 |
{ "aggs": { "by_range": { "range": { "field": "price", "ranges": [...] } } } } | 범위 버킷 |
{ "aggs": { "by_date": { "date_histogram": { "field": "date", "calendar_interval": "month" } } } } | 날짜 히스토그램 |
{ "aggs": { "by_price": { "histogram": { "field": "price", "interval": 100 } } } } | 히스토그램 |
{ "aggs": { "by_category": { "terms": {...}, "aggs": { "avg_price": { "avg": {...} } } } } } | 서브 집계 |