# How to increase autosuggest to 10?

**URL:** <https://discuss.elastic.co/t/how-to-increase-autosuggest-to-10/38960>\
**Category:** Elasticsearch\
**Created:** [January 12, 2016, 9:53am UTC](https://discuss.elastic.co/t/how-to-increase-autosuggest-to-10/38960 "2016-01-12T09:53:32Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![kartheek91](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@kartheek91](https://discuss.elastic.co/u/kartheek91)\
**Post date:** [January 12, 2016, 9:53am UTC](https://discuss.elastic.co/t/how-to-increase-autosuggest-to-10/38960/1 "2016-01-12T09:53:32Z")

</div>

Now we are using completion suggester and the suggest we are getting is 5 results and we need to increase to 10 please help.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 12, 2016, 11:00am UTC](https://discuss.elastic.co/t/how-to-increase-autosuggest-to-10/38960/2 "2016-01-12T11:00:11Z")

</div>

[As documented](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters-completion.html#querying), the `size` key can be used to choose how many results to return. It indeed defaults to five.

---

<div class="post-metadata">

**Author:** ![kartheek91](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@kartheek91](https://discuss.elastic.co/u/kartheek91)\
**Post date:** [January 12, 2016, 11:02am UTC](https://discuss.elastic.co/t/how-to-increase-autosuggest-to-10/38960/3 "2016-01-12T11:02:16Z")

</div>

It should declare in mapping or can I declare at query time and can you provide me the syntax how to use.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 12, 2016, 11:06am UTC](https://discuss.elastic.co/t/how-to-increase-autosuggest-to-10/38960/4 "2016-01-12T11:06:49Z")

</div>

Did you look at the documentation I linked to?

---

<div class="post-metadata">

**Author:** ![kartheek91](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@kartheek91](https://discuss.elastic.co/u/kartheek91)\
**Post date:** [January 12, 2016, 11:09am UTC](https://discuss.elastic.co/t/how-to-increase-autosuggest-to-10/38960/5 "2016-01-12T11:09:19Z")

</div>

yes I saw and can you please correct me

suggestQuery: function (field, query) {  
suggestBody = {  
"company-suggest": {  
"text": "",  
"completion": {  
"field": "",  
"size":"10"  
}  
}  
};

This is the syntax of my code

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 12, 2016, 11:19am UTC](https://discuss.elastic.co/t/how-to-increase-autosuggest-to-10/38960/6 "2016-01-12T11:19:50Z")

</div>

Your `field` value shouldn't be empty; it should contain the name of the field from which you want to pull the completion suggestions.

---

<div class="post-metadata">

**Author:** ![kartheek91](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@kartheek91](https://discuss.elastic.co/u/kartheek91)\
**Post date:** [January 12, 2016, 11:29am UTC](https://discuss.elastic.co/t/how-to-increase-autosuggest-to-10/38960/7 "2016-01-12T11:29:54Z")

</div>

The field value is replacing by the dynamic value where user can we set default value or not.

---

<div class="post-metadata">

**Author:** ![kartheek91](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@kartheek91](https://discuss.elastic.co/u/kartheek91)\
**Post date:** [January 13, 2016, 5:00am UTC](https://discuss.elastic.co/t/how-to-increase-autosuggest-to-10/38960/8 "2016-01-13T05:00:29Z")

</div>

Please help magnusbaeck regarding autosuggest

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 13, 2016, 6:54am UTC](https://discuss.elastic.co/t/how-to-increase-autosuggest-to-10/38960/9 "2016-01-13T06:54:17Z")

</div>

What's the question? The code snippet you posted earlier looks reasonable (if you fill in a field name and some text you want to complete), so what's the problem?

---

<div class="post-metadata">

**Author:** ![kartheek91](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@kartheek91](https://discuss.elastic.co/u/kartheek91)\
**Post date:** [January 16, 2016, 5:09am UTC](https://discuss.elastic.co/t/how-to-increase-autosuggest-to-10/38960/10 "2016-01-16T05:09:02Z")

</div>

ok I got it Magnus Back thank you for your support.

---

<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, 11:23pm UTC](https://discuss.elastic.co/t/how-to-increase-autosuggest-to-10/38960/11 "2017-07-05T23:23:51Z")

</div>


