java core
[elasticsearch] 색인 매핑(index mapping)시 옵션
'김용환'
2015. 6. 4. 00:34
elasticsearch에서 필드의 색인 매핑(index mapping)시 3 개의 옵션을 넣을 수 있다.
- no : 색인되지 않음
- not_analyzed : 색인은 되나 토큰 추출은 하지 않는다.
- analyzed : 색인은 되나, 토큰 추출을 한다.
'Thank you, mother' 토큰을 입력한다면, 다음과 같이 나누어질 수 있다.
색인 매핑 값 | Analyzer | 토큰 |
no | 색인 하지 않음 | 토큰 없음 |
not_analyzed | KeywordAnalyzer (exact 매칭) | [Thank you, mother] |
analyzed | StandardAnalyzer (공백과 구두점으로 토큰을 추출, 소문자로 변환) | [thank, you, mother] |
출처 :
https://www.elastic.co/guide/en/elasticsearch/guide/master/mapping-intro.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-keyword-analyzer.html