Completion Suggester returning duplicates

I am using Elasticsearch v5.1.1 and getting duplicates back in my results. I thought Completion Suggesters automatically filtered these out.
Am I doing something wrong?

Query:

GET /companies/company/_search
{
  "_source": ["DbaName","company-suggest"],
  "suggest": {
    "company-suggest": {
      "prefix": "grill",
      "completion": {
        "field": "company-suggest"
      }
    }

Top 3 results:

"suggest": {
    "company-suggest": [
      {
        "text": "grill",
        "offset": 0,
        "length": 5,
        "options": [
          {
            "text": "Grill",
            "_index": "companies",
            "_type": "company",
            "_id": "183221",
            "_score": 1,
            "_source": {
              "DbaName": "Grill",
              "company-suggest": [
                "183221",
                "Grill"
              ]
            }
          },
          {
            "text": "Grill",
            "_index": "companies",
            "_type": "company",
            "_id": "12460",
            "_score": 1,
            "_source": {
              "DbaName": "Grill",
              "company-suggest": [
                "12460",
                "Grill"
              ]
            }
          },
          {
            "text": "Grill",
            "_index": "companies",
            "_type": "company",
            "_id": "297860",
            "_score": 1,
            "_source": {
              "DbaName": "Grill",
              "company-suggest": [
                "297860",
                "Grill"
              ]
            }
          },

Hi,
I confirm, in 2.4.1, the returned results were uniq but in 5.1 all the documents are returned.
At this time it's a reel problem for us and we'll have to rollback all customers production under 2.4.1 until this bug is corrected or documentations released.

Cheers

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