ELK Stack Query DSL
17026 단어 elasticsearchELKelsELK
GET : 조회
- 전체 조회
GET index
_search
- Query Context
GET kibana_sample_data_ecommerce/_search { "query": { "match": { "category": "men's" } } }
- Filter Context
GET kibana_sample_data_ecommerce/_search { "query": { "bool": { "filter": { "term": { "day_of_week": "Monday" } } } } }
- Operator "and"
GET kibana_sample_data_ecommerce/_search { "_source": "customer_full_name", "query": { "match": { "customer_full_name": { "query": "mary bailey", "operator": "and" } } } }
- match_phrase
GET kibana_sample_data_ecommerce/_search { "_source": ["customer_full_name"], "size": 20, "query": { "match_phrase": { "customer_full_name": "mary bailey" } } }
- multi_match
GET kibana_sample_data_ecommerce/_search { "query": { "multi_match": { "query": "mary", "fields": [ "customer_first_name", "customer_last_name" ] } } }
- range
GET kibana_sample_data_ecommerce/_search { "query": { "range": { "products.base_price": { "gte": 10, "lte": 20 } } } }
PUT : 생성 혹은 수정
- PUT으로 데이터 생성 혹은 수정
PUT index2/_doc/2 { "name": "김현우", "gender": "male", "age": 24 }
_bulk
- 대용량 업로드
POST _bulk {"index":{"_index":"test_index"}} {"nickname":"hyunwoo","content":"ssac"} {"index":{"_index":"test_index"}} {"nickname":"kim","content":"ssac server"} {"index":{"_index":"test_index"}} {"nickname":"woo","content":"ssac client"} {"index":{"_index":"test_index"}} {"nickname":"hyunwookim","content":"ssac server"} {"index":{"_index":"test_index"}} {"nickname":"hyunwookim","content":"ssac web"} {"index":{"_index":"test_index"}} {"nickname":"man","content":"web ssac"} {"index":{"_index":"test_index"}} {"nickname":"man","content":"ssac client"} {"index":{"_index":"test_index"}} {"nickname":"fong","content":"ssac foever"} {"index":{"_index":"test_index"}} {"nickname":"fong","content":"ssac is good"} {"index":{"_index":"test_index"}} {"nickname":"hyunwookim","content":"ssac"}
ngram_analyzer
- ngram analyzer
PUT kor_index { "settings" : { "index":{ "max_ngram_diff": 50, "analysis":{ "analyzer":{ "my_ngram_analyzer": { "tokenizer": "my_ngram_tokenizer" } }, "tokenizer": { "my_ngram_tokenizer": { "type": "ngram", "min_gram": "1", "max_gram": "10" } } } } }, "mappings": { "properties": { "subway": { "type": "text", "fields": { "ngram": { "type": "text", "analyzer": "my_ngram_analyzer" } } } } } }
DELETE : 삭제
- 데이터 삭제
DELETE index
타입 | 설명 |
---|---|
must | 쿼리를 실행하여 참인 도큐먼트 찾음, 복수의 쿼리 사용 시 AND 연산 |
must_not | 쿼리를 실행하여 거짓인 도큐먼트 찾음, 다른 타입과 같이 넣을 경우 도큐먼트에서 제외 |
should | 단독으로 사용 시 쿼리를 실행하여 참인 도큐먼트 찾음, 복수의 쿼리 사용 시 OR 연산, 다른 타입과 같이 넣을 경우 스코어에만 영향 |
filter | 쿼리를 실행하여 yes/no 형식의 필터 컨텍스트 실행 |
Author And Source
이 문제에 관하여(ELK Stack Query DSL), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@hyunwoodev/ELK-Stack-Query-DSL저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)