{
"index":"category",
"body":{
"settings":{
"number_of_shards":1,
"number_of_replicas":1,
"max_ngram_diff":50,
"analysis":{
"analyzer":{
"custom_analyzer":{
"type":"custom",
"char_filter":[
"e_char_filter"
],
"tokenizer":"nGram",
"filter":[
"stopwords",
"ru_stopwords",
"asciifolding",
"lowercase",
"snowball"
]
},
"custom_search_analyzer":{
"type":"custom",
"char_filter":[
"e_char_filter"
],
"tokenizer":"standard",
"filter":[
"stopwords",
"ru_stopwords",
"asciifolding",
"lowercase",
"snowball"
]
}
},
"tokenizer":{
"nGram":{
"type":"nGram",
"min_gram":2,
"max_gram":20
}
},
"filter":{
"snowball":{
"type":"snowball",
"language":"Russian"
},
"stopwords":{
"type":"stop",
"stopwords":"_russian_",
"ignore_case":"true"
},
"ru_stopwords":{
"type":"stop",
"stopwords":"рецепт"
}
},
"char_filter":{
"e_char_filter":{
"type":"mapping",
"mappings":[
"Ё => Е",
"ё => е"
]
}
}
}
},
"mappings":{
"_source":{
"enabled":true
},
"properties":{
"name":{
"type":"text",
"analyzer":"custom_analyzer",
"search_analyzer":"custom_search_analyzer"
},
"url":{
"type":"text",
"analyzer":"custom_analyzer",
"search_analyzer":"custom_search_analyzer"
},
"id":{
"type":"integer"
}
}
}
}
}