А если так?
DELETE test
PUT test
{
"mappings": {
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "text",
"analyzer": "snowball_analyzer",
"fields": {
"ngram": {
"type": "text",
"analyzer": "ngram_index_analyzer",
"search_analyzer": "ngram_search_analyzer"
}
}
},
"lot_info": {
"type": "text",
"analyzer": "snowball_analyzer",
"fields": {
"ngram": {
"type": "text",
"analyzer": "ngram_index_analyzer",
"search_analyzer": "ngram_search_analyzer"
}
}
}
}
},
"settings": {
"analysis": {
"analyzer": {
"ngram_index_analyzer": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"stopwords",
"asciifolding",
"lowercase",
"app_ngram"
]
},
"ngram_search_analyzer": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"asciifolding",
"lowercase",
"stopwords"
]
},
"snowball_analyzer": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"asciifolding",
"lowercase",
"stopwords",
"snowball"
]
}
},
"filter": {
"snowball": {
"type": "snowball",
"language": "Russian"
},
"stopwords": {
"type": "stop",
"stopwords": "_russian_"
},
"app_ngram": {
"type": "ngram",
"min_gram": 4,
"max_gram": 4
}
}
}
}
}
POST test/_bulk?refresh
{ "index": {"_id": "1" } }
{ "name": "Автомобиль тойота камри" }
GET test/_search
{
"query": {
"bool": {
"must": {
"multi_match": {
"query": "Автомобиль камри",
"fields": [
"name^5",
"lot_info^2",
"name.ngram^3",
"lot_info.ngram"
],
"operator": "or"
}
}
}
}
}