Completion suggester not returning all suggestions

时间:2017-11-13 06:42:59

标签: elasticsearch autocomplete nosql

I'm using completion suggester for auto completion. Everything is fine. but I'm not getting all matched suggestions. I'm getting below 10 suggestions. How to increase suggestions count?

1 个答案:

答案 0 :(得分:2)

您可以设置"尺寸"搜索请求中的属性。

查看文档 https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters-completion.html

示例:

POST music/_search
{
    "_source": "suggest", 
    "suggest": {
        "song-suggest" : {
            "prefix" : "nir",
            "completion" : {
                "field" : "suggest", 
                "size" : 20 
            }
        }
    }
}