The autocompletion query is not returning logical values. For example, adding e
starts returning Azerbaijani
. The query that goes is e*
, which is weird that Azerbaijani
is returned since it that not start by e
.
"hits": [
{
"id": "jxvc9-18d97",
"type": 1,
"title": "Afar"
},
{
"id": "gymv3-dj020",
"type": 1,
"title": "Abkhazian"
},
{
"id": "w1p7s-9ny73",
"type": 1,
"title": "Afrikaans"
},
{
"id": "trfrg-8f634",
"type": 1,
"title": "Akan"
},
{
"id": "wfw9v-kyp21",
"type": 1,
"title": "Amharic"
}
],
Queries with normal ES query string sintax like using quotes fro exact match do not work. Tested also Eng
, eng
and english
.
"tokenizer": {
"autocomplete": {
"type": "edge_ngram",
"min_gram": 1,
"max_gram": 20,
"token_chars": [
"letter"
]
}
}
"analyzer": {
"autocomplete": {
"tokenizer": "autocomplete",
"filter": [
"lowercase"
]
},
"autocomplete_search": {
"tokenizer": "lowercase"
},
}
--- then in the field
"<field name>": {
"type": "text",
"analyzer": "autocomplete",
"search_analyzer": "autocomplete_search"
},