Elasticsearch 5.6 shows duplicate suggest result

(Vinish Soman) #1

Hello Team,

I am using elasticsearch 5.6 cluster and when I try to perform suggest query it is giving duplicate results. As data in the field contain duplicate data but I need a unique suggest result.

Mapping -- >
"indexTest-21-12-17": {
"mappings": {
"policy": {
"properties": {
"SuggestAccountName": {
"type": "completion",
"analyzer": "simple",
"preserve_separators": true,
"preserve_position_increments": true,
"max_input_length": 1000

Query -->

(Adrien Grand) #2

You might want to look into the skip_duplicates option which is available as of 6.1: https://www.elastic.co/guide/en/elasticsearch/reference/master/search-suggesters-completion.html#skip_duplicates.

(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.