- 追加された行はこの色です。
- 削除された行はこの色です。
-Indexやらanalyzerやらmappingやらのお話
#contents
**analyzer [#pf74e61e]
|standard|一文字だけ|
|simple|スペース区切り|
|kuromoji|日本語の形態素解析|
**mapping [#nb72fd6d]
-フィールドごとに型定義をし、analyzerの設定も行う
"mappings": {
"company": {
"_source": {
"enabled": true
},
"_all": {
"enabled": true,
"analyzer": "kuromoji_analyzer"
},
"properties": {
"id": {
"type": "integer",
"index": "not_analyzed"
},
"name": {
"type": "string",
"index": "analyzed",
"analyzer": "ngram_analyzer"
},
"location": {
"type": "string",
"index": "analyzed",
"analyzer": "kuromoji_analyzer"
}
}
},
"project": {
"_source": {
"enabled": true
},
"_all": {
"enabled": true,
"analyzer": "kuromoji_analyzer"
},
"_parent": {
"type": "company"
},
"properties": {
"id": {
"type": "integer",
"index": "not_analyzed"
},
"title": {
"type": "string",
"index": "analyzed",
"analyzer": "kuromoji_analyzer"
}
}
}
}
*参考サイト [#ac856bab]
+http://engineer.wantedly.com/2014/02/25/elasticsearch-at-wantedly-1.html
#counter