Hi,
We have the following index:
{
"order": 0,
"index_patterns": ["programs"],
"settings": {
"analysis": {
"filter": {
"autocomplete_filter": {
"type": "edge_ngram",
"min_gram": 2,
"max_gram": 20
}
},
"analyzer": {
"autocomplete": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"lowercase",
"autocomplete_filter"
]
}
}
}
},
"mappings": {
"program": {
"properties": {
"title": {
"type": "text",
"analyzer": "autocomplete",
"search_analyzer": "standard"
}
}
}
}
}
Problem is that we get the following order:
espnnfl
espnuk
espne60
...
..
...
espn
When we search:
"query": {
"multi_match": {
"query": 'espn',
"fields": [
"title"
],
"fuzziness": "auto"
}
}
How can we get ESPN first? we want to "boost" shorter and equal terms first