# Completion suggester: Not returning all options

**URL:** <https://discuss.elastic.co/t/completion-suggester-not-returning-all-options/106114>\
**Category:** Elasticsearch\
**Created:** [November 2, 2017, 3:04am UTC](https://discuss.elastic.co/t/completion-suggester-not-returning-all-options/106114 "2017-11-02T03:04:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jaspreet\_Singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaspreet_singh/32/58296_2.png) [@Jaspreet\_Singh](https://discuss.elastic.co/u/Jaspreet_Singh)\
**Post date:** [November 2, 2017, 3:04am UTC](https://discuss.elastic.co/t/completion-suggester-not-returning-all-options/106114/1 "2017-11-02T03:04:52Z")

</div>

The mapping of field looks like  
'''  
"topics": {  
"type": "text",  
"fields": {  
"topics\_suggest": {  
"type": "completion",  
"analyzer": "english",  
"preserve\_separators": true,  
"preserve\_position\_increments": true,  
"max\_input\_length": 50  
}  
}  
}  
'''  
A sample document has this data:  
'''  
"topics": [  
"Cloud Computing",  
"Cloud Services"  
]  
'''  
The query looks like ...  
'''  
GET test\_new\_index/\_search  
{  
"\_source": "false",  
"suggest": {  
"topics\_suggest": {  
"completion": {  
"field": "topics.topics\_suggest",  
"fuzzy": true  
},  
"prefix": "cloud"  
}  
}  
}  
'''  
The output is  
'''  
"suggest": {  
"topics\_suggest": [  
{  
"text": "cloud",  
"offset": 0,  
"length": 5,  
"options": [  
{  
"text": "Cloud Computing",  
"\_index": "test\_autosuggest\_english\_analyzer",  
"\_type": "document",  
"\_id": "40000202",  
"\_score": 4,  
"\_source": {}  
}  
]  
}  
]  
}  
'''  
It should return both Cloud Computing and Cloud Services.

---

<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:** [November 30, 2017, 3:04am UTC](https://discuss.elastic.co/t/completion-suggester-not-returning-all-options/106114/2 "2017-11-30T03:04:59Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
