# Completion Suggestion searches only left to right order. Can we overcome this

**URL:** <https://discuss.elastic.co/t/completion-suggestion-searches-only-left-to-right-order-can-we-overcome-this/48640>\
**Category:** Elasticsearch\
**Created:** [April 28, 2016, 7:49am UTC](https://discuss.elastic.co/t/completion-suggestion-searches-only-left-to-right-order-can-we-overcome-this/48640 "2016-04-28T07:49:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kimiben\_patel](https://avatars.discourse-cdn.com/v4/letter/k/e47774/32.png) [@kimiben\_patel](https://discuss.elastic.co/u/kimiben_patel)\
**Post date:** [April 28, 2016, 7:49am UTC](https://discuss.elastic.co/t/completion-suggestion-searches-only-left-to-right-order-can-we-overcome-this/48640/1 "2016-04-28T07:49:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:55pm UTC](https://discuss.elastic.co/t/completion-suggestion-searches-only-left-to-right-order-can-we-overcome-this/48640/2 "2017-07-05T22:55:39Z")

</div>


