Filter 17

2-1-2. Combining Filters

The previous two examples showed a single filter in use. In practice, you will probably need to filter on multiple values or fields. For example, how would you express this SQL in Elasticsearch?앞의 두 가지 예제는 단일 filter의 사용을 보여준다. 실제 상황에서는, 아마도 여러 값 또는 field를 filtering해야 할 것이다. 예를 들면, 아래의 SQL을 Elasticsearch에서는 어떻게 표현할까?SELECT product FROM products WHERE (price = 20 OR productID = "XHDK-A-1293-#fJ3")..

2-1-3. Finding Multiple Exact Values

The term query is useful for finding a single value, but often you’ll want to search for multiple values.What if you want to find documents that have a price of $20 or $30?term query는 단일 값을 찾는데 유용하다. 그러나, 가끔은 다중 값을 찾을 수도 있다. 가격이 $20 또는 $30인 document를 찾으려면 어떻게 해야 할까?Rather than using multiple term queries, you can instead use a single terms query (note the s at the end). The terms query is simply..

2-2. Full-Text Search

Now that we have covered the simple case of searching for structured data, it is time to explore full-text search: how to search within full-text fields in order to find the most relevant documents.지금까지 구조화된 데이터를 위한, 간단한 검색을 살펴봤다. 이제 full-text 검색(full-text search) 을 탐험할 시간이다. 가장 적합한 document를 찾기 위해, full-text field를 검색하는 방법을 알아 보자.The two most important aspects of full-text search are as follows..

2-2-4. Combining Queries

In Combining Filters we discussed how to use the bool filter to combine multiple filter clauses with and, or, and not logic. In query land, the bool query does a similar job but with one important difference.Combining Filters에서, 다수의 filter 절을 and, or, not 으로 조합하기 위해, bool filter를 사용하는 방법에 대해 이야기한 바 있다. query에서도, bool query는 비슷한 작용을 하지만, 한가지 중요한 차이점이 있다.Filters make a binary decision: should this..

4-06. Filtering Queries and Aggregations

A natural extension to aggregation scoping are filtering queries. Because the aggregation operates in the context of the query scope, any filter applied to the query will also apply to the aggregation.aggregation 범위 지정에 대한 자연스러운 확장은 filtering query이다. aggregation은 query의 범위 지정 문맥에서 동작하므로, query에 적용된 어떠한 filter도 aggregation에 적용될 수 있다.

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