[Elasticsearch] 그냥 settings, mappings, template 예제
Elastic/Elasticsearch 2018. 7. 4. 14:05[Settings]
"settings":{
"number_of_shards":1,
"number_of_replicas":0,
"index.refresh_interval":"1h",
"index.routing.allocation.require.box_type":"indexing",
"index.similarity.default.type":"BM25",
"index":{
"analysis":{
"analyzer":{
"arirang_custom_analyzer":{
"tokenizer":"arirang_tokenizer",
"filter":[
"lowercase",
"trim",
"arirang_synonym",
"arirang_filter"
]
}
},
"filter":{
"arirang_synonym":{
"type":"synonym_graph",
"synonyms":[]
}
}
}
}
}
[Mappings]
"mappings" : {
"product": {
"_source": {
"enabled": true
},
"dynamic_templates": [
{
"strings": {
"match_mapping_type": "string",
"mapping": {
"type": "text",
"analyzer": "arirang_custom_analyzer",
"fields": {
"raw": {
"type": "keyword",
"ignore_above": 50
}
}
}
}
}
]
}
}