lucene 색인 옵션

Elastic/Elasticsearch 2012. 12. 10. 10:50

짧게 정리...

※ Store 옵션
데이터를 저장 할지에 대한 정의.
결국, 검색 후 화면에 출력을 할 것인지 말 것인지에 따라 정의.

Store.YES : 저장 함
Store.NO : 저장 안함 
Store.COMPRESS : 압축 저장 함 (글 내용이 크거나, binary 파일)


※ Index 옵션
검색을 위한 색인을 할지에 대한 정의.
아래는 2.x 대 내용이니 패스, 4.0 을 보면 전부 deprecated 된 걸로 나오내요.
그래도 의미는 파악 하고 있음 좋겠죠.

Index.NO : 색인을 하지 않음 (검색 field 로 사용하지 않음)
Index.TOKENIZED : 검색 가능 하도록 색인 함, analyzer 에 의한 tokenized 수행을 통해 색인을 함.
Index.UN_TOKENIZED : 검색 가능 하도록 색인 함, 단 analyzer 에 의한 분석을 하지 않기 때문에 색인 속도가 빠름. (숫자나 분석이 필요 없는 경우)
Index.NO_NORMS : 검색 가능 하도록 색임 함, 단 색인 속도가 매우 빨라야 할 경우 사용하며, analyzer 에 의한 분석을 수행 하지 않고, field length normalize 를 수행 하지 않음.


http://lucene.apache.org/core/4_0_0/core/index.html

Enum Constant and Description
ANALYZED
Deprecated. 
Index the tokens produced by running the field's value through an Analyzer.
ANALYZED_NO_NORMS
Deprecated. 
Expert: Index the tokens produced by running the field's value through an Analyzer, and also separately disable the storing of norms.
NO
Deprecated. 
Do not index the field value.
NOT_ANALYZED
Deprecated. 
Index the field's value without using an Analyzer, so it can be searched.
NOT_ANALYZED_NO_NORMS
Deprecated. 
Expert: Index the field's value without an Analyzer, and also disable the indexing of norms.

: