How to increase autosuggest to 10?

(Kartheek Gummaluri) #1

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.

(Magnus Bäck) #2

As documented, the size key can be used to choose how many results to return. It indeed defaults to five.

(Kartheek Gummaluri) #3

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

(Magnus Bäck) #4

Did you look at the documentation I linked to?

(Kartheek Gummaluri) #5

yes I saw and can you please correct me

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

This is the syntax of my code

(Magnus Bäck) #6

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

(Kartheek Gummaluri) #7

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

(Kartheek Gummaluri) #8

Please help magnusbaeck regarding autosuggest

(Magnus Bäck) #9

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?

(Kartheek Gummaluri) #10

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

(system) #11