Multi match returns 1 of 2 available matches

Hello, I've been using elastic and have recently run into a puzzling issue. I've got two records with the same first and last name and when I use a phrase prefix query for last name, only 1 returns:

{
  "query": {
    "bool": {
      "must": [
        {
          "multi_match": {
            "fields": [
              "lastName"                            
            ],
            "query": "BALL",
            "type": "phrase_prefix"
          }
        }
      ]
    }
  }
}

Running the above query returns 1 of 2 records "BASE BALL". (Both records have the same first name: BASE and last name: BALL)

If I include max_expansions: 70 instead of the default 50, both records return. This is puzzling because they have the exact same last name in my test environment so I would expect them both to return without having to toggle max_expansions lastName is a text field.

Has anyone run into this before or have a good explanation for this?

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