Please help me with choosing ElasticSearch suggesting type.
I have ElasticSearch index with big amount of companies, which have names like: "JSC Some company", "JSC Another company" and so on.
The Completion suggester doesn't work because user prefer type: "Some co..." but suggester works only if user starts with "JSC Some co..."
Is there any way to create quick search during user typing?
I want to add my mapping example and suggest query example in order get question more clear:
curl -XPUT 'localhost:9200/tass_suggest_test/_mapping/company?pretty' -H 'Content-Type: application/json' -d'
{
"company": {
"properties": {
"id": {
"type": "integer"
},
"inn": {
"type": "keyword"
},
"innSuggest" : {
"type" : "completion",
"analyzer": "whitespace"
}
}
}
}
'
curl -XGET 'localhost:9200/tass_suggest_test/_suggest?pretty' -H 'Content-Type: application/json' -d'
{
"company-suggest" : {
"prefix" : "78200",
"completion" : {
"field" : "innSuggest"
}
}
}
'
You can try using an ngram filter in the following manner.