so here is my mapping
"skills_completion": {
"type": "completion",
"contexts": [
{
"name": "api_key",
"type": "category"
}
]
},
and below are my inserted data in skills_completion
{ "input": [ "deal", "don", "drag", "resource", "question", "player", "training" ], "contexts": { "api_key": "4" } }
{ "input": [ "deal", "dog", "group", "resource", "question", "player", "training" ], "contexts": { "api_key": "4" } }
thing is that when I query it like this
POST /cvs/_search
{
"_source": false,
"suggest": {
"name-suggest": {
"prefix": "d", // Change this prefix as needed
"completion": {
"field": "skills_completion",
"skip_duplicates": true,
"contexts": {
"api_key": [
{
"context": "4"
}
]
}
}
}
}
}
thing is that In response I get only deal and not deal, dog, don, drag
however when I query with prefix = "do" then I do get dog,don
what is the issue here is it due to an array that I am providing for completion or something else