[Elasticsearch] aggregations 사용 시 filter 의 차이점.

Elastic/Elasticsearch 2014. 6. 18. 11:32

알고 있는 내용도 다시 짚고 넣어 갑시다. ^^

우선 aggregation 이 궁금하신 분들은 꼭 필독하시기 바랍니다.

http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/aggregations.html


데이터가 많아도 분석을 어떻게 할지 몰라서는 그냥 쓰레기에 불과 하지 않겠죠.


aggregations 사용 시 filter 사용에 대한 주의 사항입니다.

원문에서 그대로 가져왔습니다.


Choosing the appropriate type of filtering — search hits, aggregations or both — often boils down to how you want your user interface to behave. Choose the appropriate filter (or combinations) depending on how you want to display results to your user.

  • filtered query: affects both search results and aggregations
  • filter bucket: affects just aggregations
  • post_filter: affects just search results


지난 번 buzz 에서 발표되었던 내용에 대해서도 살짝 언급 했었죠.

query vs filter 에 대한 차이점에 대해서...

역시 aggregations 에서도 filter 사용은 주의해서 사용을 해야 겠내요.

: