Es接頭辞ブラーマッチングカスタムedge_ngram
1493 ワード
put /my_index
{
"settings": {
"analysis": {
"analyzer": {
"code_index_analyzer": {
"tokenizer": "code_index_tokenizer",
"filter": [
"lowercase"
]
},
"code_search_analyzer": {
"tokenizer": "keyword",
"filter": [
"lowercase"
]
}
},
"tokenizer": {
"code_index_tokenizer": {
"type": "edge_ngram",
"min_gram": 1,
"max_gram": 10
}
}
}
}
}
PUT /my_index/my_type/_mappings
{
"my_type": {
"properties": {
"name": {
"type": "text",
"analyzer": "code_index_analyzer",
"search_analyzer": "code_search_analyzer"
}
}
}
}