Query 12

2019.05.19 - 고급 튜닝: 느린 Elasticsearch 쿼리를 찾아 문제 해결

Elasticsearch는 매우 유연하고 기능이 풍부한 애플리케이션으로, 데이터를 쿼리하는 다양한 방법을 제공합니다. 그러나 기대했던 것보다 느린 속도의 쿼리를 경험해 본 적이 있으신가요? Elasticsearch와 같은 분산 시스템에는 로드 밸런서 설정, 네트워크 지연 시간(대역폭, NIC 카드/드라이버) 등과 같은 외부 요인을 비롯하여 쿼리 성능에 영향을 미치는 다양한 요소가 있을 수 있습니다.이 블로그에서는 쿼리 속도 저하의 원인과 Elasticsearch의 컨텍스트 내에서 이를 식별하는 방법에 대해 설명합니다. 또한 Elasticsearch 작동 방식에 상당히 익숙해야 사용할 수 있는 몇 가지 일반적인 문제 해결 방법을 다룹니다.Elasticsearch 쿼리 속도 저하의 일반적인 원인몇 가지 까다..

Blog 2020.09.25

2017.05.23 - 번역 - In which order are my Elasticsearch queries/filters executed? ...

We often get questions about the order in which filters are executed, whether filters get executed before or after queries, etc. Those are indeed important questions: the recipe for quickly executing a query is often related to running the cheap bits before the expensive ones. You might have heard or read in the past that filters are executed before queries. While this statement is a good way to..

Blog 2019.01.07

v2.0-06. Query DSL changes

Queries and filters mergededitQueries and filters have been merged — all filter clauses are now query clauses. Instead, query clauses can now be used in query context or in filter context:query와 filter는 통합되었다. 모든 filter절은 이제 query절이다. 대신, 이제 query절은 query context 나 filter context 에서 사용된다.Query contextA query used in query context will calculate relevance scores and will not be cacheable. Query c..

1-07-2. Query DSL

The query DSL is a flexible, expressive search language that Elasticsearch uses to expose most of the power of Lucene through a simple JSON interface. It is what you should be using to write your queries in production. It makes your queries more flexible, more precise, easier to read, and easier to debug.query DSL은 간단한 JSON interface를 이용해, Lucene을 100% 활용하기 위해, Elasticsearch가 사용하는 유연하고, 표현력 있는 검..

1-07-3. Queries and Filters

The DSL used by Elasticsearch has a single set of components called queries, which can be mixed and matched in endless combinations. This single set of components can be used in two contexts: filtering context and query context.elasticsearch에서 사용되는 DSL은"DSL (Domain Specific Language)"query라 불리는 component의 단일 집합을 가지는데, 이것은 무한한 조합으로 섞이고 일치될 수 있다. 이 단일 component 집합은 두 개의 context, filtering과 query c..

1-09-1. Query Phase

During the initial query phase, the query is broadcast to a shard copy (a primary or replica shard) of every shard in the index. Each shard executes the search locally and builds a priority queue of matching documents.초기 query 절 에서, query는 index에 있는 모든 shard의, shard 복사본(primary 또는 replica shard)에 전달된다. 각 shard는 내부적으로 검색을 실행하고, 일치하는 document의 우선순위(priority) queue 를 생성한다.우선순위(priority) QueueA prio..

1-09-2. Fetch Phase

The query phase identifies which documents satisfy the search request, but we still need to retrieve the documents themselves. This is the job of the fetch phase, shown in Figure 15, “분산 검색의 fetch 절”.query 절은 어떤 document가 검색 request를 만족하는지를 확인할 뿐이다. 이제 document 자체를 가져와야 한다. 이것이, Figure 15, “분산 검색의 fetch 절”에서 보이는 fetch 절의 역할이다.Figure 15. 분산 검색의 fetch 절 The distributed phase consists of the follow..

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..