DB/Elasticsearch
-
[ELK] logstash filter grok 사용DB/Elasticsearch 2022. 12. 18. 22:36
https://logz.io/blog/logstash-grok/ A Beginner’s Guide to Logstash Grok | Logz.io Logstash Grok plays a crucial part in the logging pipeline. Here's how to get started and construct filters for Syslog, Apache, and Elasticsearch. logz.io https://www.elastic.co/kr/blog/a-practical-introduction-to-logstash A Practical Introduction to Logstash Elastic Stack은 가능한 한 쉽게 Elasticsearch에 데이터를 수집할 수 있도록 해 ..
-
[Elasticsearch] 엘라스틱서치 bool query 사용DB/Elasticsearch 2021. 6. 29. 18:33
query_string 쿼리는 여러 조건을 조합하기에는 용이한 문법이지만 옵션이 한정되어 있다. 여러 쿼리를 조합하기 위해서는 상위에 bool 쿼리를 사용하고 그 안에 다른 쿼리들을 넣는 식으로 사용 가능하다. bool 쿼리는 4개의 인자를 가지고 있고, 그 인자 안에 다른 쿼리들을 배열로 넣는 방식으로 동작한다. must : 쿼리가 참인 도큐먼트들을 검색 must_not : 쿼리가 거짓인 도큐먼트들을 검색 should : 검색 결과 중 이 쿼리에 해당하는 도큐먼트의 점수를 높인다 filter : 쿼리가 참인 도큐먼트를 검색하지만 스코어를 계산하지 않는다. must 보다 검색 속도가 빠르고 캐싱이 가능. GET /_search { "query": { "bool": { "must": [ { }, … ], ..