본문 바로가기
Computer/Elasticsearch

doc values

by hexists 2015. 5. 6.

http://www.elastic.co/guide/en/elasticsearch/guide/current/doc-values.html


인덱스 시점에 disk에 in-memory fielddata를 저장하는 방법

doc value는 in-memory fielddata에 비해 10~25% 느리다.

하지만, 2가지 장점이 있다.

1) heap memory 대신 disk에 있다.

   더 적은 heap을 사용할 수 있고, gc의 속도를 향상 시킬 수 있고, 일관성과 노드의 안정성을 향상 시킬 수 있다.

2) doc values는 index time에 빌드된다.


trade-off는 larger index size와 약간 느려진 fielddata access이다.

doc values는 상당히 효율적이다. 그래서 많은 queries에서 약간 늦어진 것을 못 알아차릴수도 있다. 

더 빠른 gc와의 결합과 향상된 초기화 시간의 결합은 더 빨라진 것으로 느낄수도 있다.


더 많은 filesystem cache space를 너는 사용할 수 있다면, 더 나은 성능을 가질 수 있다.

만약 파일들이 docs values를 filesystem cache에 상주시킨다면, file 접근은 RAM으로부터 읽는 것과 거의 동일하다.

그리고, filesystem cache는 JVM대신 kernal에 의해 관리된다.


Enabling Doc Values


Doc values는 numeric, date, Boolean, binary, and geo-point fields, and for not_analyzed string fields에 enable할 수 있다.

analyze string fields에서는 작동하지 않는다.

Doc values는 각 field마다 enable할 수 있다. 이것은 in-memory fielddata와 doc values를 결합할 수 있다는 의미이다.


PUT /music/_mapping/song

{

  "properties" : {

    "tag": {

      "type":       "string",

      "index" :     "not_analyzed",

      "doc_values": true 

    }

  }

}


'Computer > Elasticsearch' 카테고리의 다른 글

cache(indices.cache.filter.size)  (0) 2015.05.28
elasticsearch thread pool  (0) 2015.05.07
eager, eager global ordinals  (1) 2015.05.06
Field data  (0) 2015.05.06
shard 상태 확인  (0) 2015.03.09