non-scoring query 3

4-06-1. Filtering Queries

If we want to find all cars over $10,000 and also calculate the average price for those cars, we can use a constant_score query and its filter clause:$10,000 이상의 모든 자동차와 해당 자동차들의 평균가를 계산하려면, constant_score query와 filter절을 사용할 수 있다.GET /cars/transactions/_search { "size" : 0, "query" : { "constant_score": { "filter": { "range": { "price": { "gte": 10000 } } } } }, "aggs" : { "single_avg_price": {..

2.X/4. Aggregations 2017.09.23

4-06-3. Post Filter

So far, we have a way to filter both the search results and aggregations (a non-scoring filterquery), as well as filtering individual portions of the aggregation (filter bucket).이제, 검색 결과와 aggregation 양쪽 모두를 filtering(non-scoring filter query)하고, aggregation의 개별 부분을 filtering(filter bucket)하는 방법을 알게 되었다.You may be thinking to yourself, "hmm…is there a way to filter just the search results but no..

2.X/4. Aggregations 2017.09.23

4-06-4. Recap

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.filtering의 적절한 type(검색 hits, aggregation 또는 둘 모두)을 선택하는 것은, 사용자 인터페이스의 동작 방법이 핵심이다. 사용자에게 결과를 나타내는 방법에 따라, 적절한 filter나 조합을 선택하자.A non-scoring query in..

2.X/4. Aggregations 2017.09.23