'index_options'에 해당되는 글 1건

  1. 2016.03.16 [Elasticsearch] index_options 알아보기.

[Elasticsearch] index_options 알아보기.

Elastic/ElasticsearchReferences 2016. 3. 16. 11:03

Mapping parameters 중에 index_options에 대해서 알아보겠습니다.

(이전에 정리한게 없어서 복습 차원에서 기록 합니다.)


원본문서)


원본 Snippet)

docs

Only the doc number is indexed.
Can answer the question
 Does this term exist in this field?

freqs

Doc number and term frequencies are indexed.
Term frequencies are used to score repeated terms higher than single terms.

positions

Doc number, term frequencies, and term positions (or order) are indexed.
Positions can be used for
 proximity or phrase queries.

offsets

Doc number, term frequencies, positions, and start and end character offsets
(which map the term back to the original string) are indexed.
Offsets are used by the
 postings highlighter.

Analyzed string fields use positions as the default, and all other fields use docs as the default.

The text field will use the postings highlighter by default because offsets are indexed.


▶ 내용을 정리해 보면 이렇습니다.

index_options 는 기본 analyzed field에 대해서 구성 하는 것입니다. not_analyzed field는 아니라는 이야기죠.

그리고 이 옵션은 아래로 내려 갈수록 상위 옵션을 포함하게 됩니다.


docs는 말 그대로 document count만 색인 합니다.

freqs는 말 그대로 docs + term frequnce를 색인 합니다.

positions는 말 그대로 freqs + term position을 색인 합니다.

offsets는 말 그대로 positions + term offset을 색인 합니다.


positions를 설정 하게 되면 proximity 또는 phrase query를 사용 할 수 있습니다. 즉, 설정 하지 않으면 말짱 꽝!!

offsets를 설정 하게 되면 추가적으로 highlight 기능을 사용 할 수 있습니다. 강조를 사용해야 하는데 설정 하지 않으면 역시 말짱 꽝!!


analyzed field 의 기본 index_options는 positions 입니다. 그리고 강조 기능은 기본 posting hilighter 입니다.


: