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.
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.
As documented, the size
key can be used to choose how many results to return. It indeed defaults to five.
It should declare in mapping or can I declare at query time and can you provide me the syntax how to use.
Did you look at the documentation I linked to?
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
Your field
value shouldn't be empty; it should contain the name of the field from which you want to pull the completion suggestions.
The field value is replacing by the dynamic value where user can we set default value or not.
Please help magnusbaeck regarding autosuggest
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?
ok I got it Magnus Back thank you for your support.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.