2.X/4. Aggregations 38

4-10-1. Doc Values

Aggregations work via a data structure known as doc values (briefly introduced in Doc Values Intro).Doc values are what make aggregations fast, efficient and memory-friendly, so it is useful to understand how they work.aggregation은 doc values (Doc Values Intro에서 간단히 소개된)로 알려진 데이터 구조를 통해, 동작한다.doc values는 aggregation을 빠르게, 효율적으로, 메모리 친화적으로 만든다. 때문에, 그것이 동작하는 방법을 이해하는 것은 중요하다.Doc values exists bec..

2.X/4. Aggregations 2017.09.23

4-10-2. Deep Dive on Doc Values

The last section opened by saying doc values are "fast, efficient and memory-friendly". Those are some nice marketing buzzwords, but how do doc values actually work?지난 장에서 doc value는 "빠르고, 효율적이며, 메모리 친화적" 이라고 언급했었다. 약간은 멋진 마케팅 전문용어이긴 하지만, 실제로 doc values는 어떻게 동작할까?Doc values are generated at index-time, alongside the creation of the inverted index. That means doc values are generated on a per-seg..

2.X/4. Aggregations 2017.09.23

4-10-3. Aggregations and Analysis

Some aggregations, such as the terms bucket, operate on string fields. And string fields may be either analyzed or not_analyzed, which raises the question: how does analysis affect aggregations?terms bucket 같은 어떤 aggregation은 string field에서 동작한다. 그리고, string field는 analyzed 나 not_analyzed 일 것이다. 그렇다면 질문이 있을 것이다. 분석은 aggregation에 어떤 영향을 미치는가?The answer is "a lot," for two reasons: analysis affect..

2.X/4. Aggregations 2017.09.23

4-10-4. Limiting Memory Usage

Once analyzed strings have been loaded into fielddata, they will sit there until evicted (or your node crashes). For that reason it is important to keep an eye on this memory usage, understand how and when it loads, and how you can limit the impact on your cluster.일단 analyzed string이 fielddata에 로드되면, 그것들은 추출될 (또는 node가 crash)) 때까지 그 곳에 있을 것이다. 이런 이유로 이런 메모리 사용을 관찰하고, 그것이 언제 어떻게 로드되는지를 이해하고, clus..

2.X/4. Aggregations 2017.09.23

4-10-5. Fielddata Filtering

Imagine that you are running a website that allows users to listen to their favorite songs. To make it easier for them to manage their music library, users can tag songs with whatever tags make sense to them. You will end up with a lot of tracks tagged with rock, hiphop, and electronica, but also with some tracks tagged with my_16th_birthday_favorite_anthem.사용자들이 각자가 좋아하는 노래를 들을 수 있는 website를 운영..

2.X/4. Aggregations 2017.09.23

4-10-6. Preloading Fielddata

The default behavior of Elasticsearch is to load in-memory fielddata lazily. The first time Elasticsearch encounters a query that needs fielddata for a particular field, it will load that entire field into memory for each segment in the index.Elasticsearch의 기본 동작은 in-memory fielddata를 지연시켜(lazily) 로드 하는 것이다. Elasticsearch가 특정 field에 대해, fielddata가 필요한, query를 처음으로 만나면, index에 있는 각 segment에 대해, 전..

2.X/4. Aggregations 2017.09.23