Word-oriented completion suggester (ElasticSearch 5.x)

后端 未结 3 946
离开以前
离开以前 2020-12-05 02:47

ElasticSearch 5.x introduced some (breaking) changes to the Suggester API (Documentation). Most notable change is the following:

Completion su

3条回答
  •  醉话见心
    2020-12-05 03:35

    An additional field skip_duplicates will be added in the next release 6.x.

    From the docs at https://www.elastic.co/guide/en/elasticsearch/reference/master/search-suggesters-completion.html#skip_duplicates:

    POST music/_search?pretty
    {
        "suggest": {
            "song-suggest" : {
                "prefix" : "nor",
                "completion" : {
                    "field" : "suggest",
                    "skip_duplicates": true
                }
            }
        }
    }
    

提交回复
热议问题