We have string which contains "Working on Elastic Search"
If my suggestion text is "work" then it is showing suggestions, but if it is "elastic", then no suggestions.
Can we overcome this
Mapping
PUT /testing/test/_mapping
{
"test" : {
"properties" : {
"testsub" : { "type" : "string" },
"suggestion" : { "type" : "completion",
"analyzer" : "simple",
"search_analyzer" : "simple",
"payloads" : true,
"preserve_position_increments" : true
},
"desc" : { "type" : "string" }
}
}
}
Record
PUT /testing/test/1?refresh=true
{
"testsub" : "Elastic search",
"suggestion" : {
"input": [ "testing", "Working on Elastic search"]
},
"desc" : "this is description"
}
Suggestor
When i search for elastic
POST /testing/_suggest?pretty
{
"test-suggest" : {
"text" : "Elastic",
"completion" : {
"field" : "suggestion"
}
}
}
Response for text Elastic
{
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"test-suggest": [
{
"text": "Elastic",
"offset": 0,
"length": 7,
"options": []
}
]
}
How can we overcome this issue.
Thank You.