Migrating from Elastic Search 5.x to 6.x broke this query and I would like to understand why

Hello,

Assume an index with a "person" type with firstName, lastName and homePhone, workPhone, address, etc. fields.

We have this query running on Elastic Search 5.x

{
  "query": {
    "bool": {
      "must": [
        { "query_string": { "query": "aFirstName aLastName 5556668888", "all_fields": "true", "default_operator": "and" }}
      ],
      "filter": [
        {
          "term": {
            "aCertainField": {
              "value": 2
            }
          }
        }
      ]
    }
  }
}

As I understand, this used to search each term across all fields and return whatever was the best match.

Running the same query in 6.x doesn't return anything. I feel it has something to do with the _allfield disappearing but I can't put my finger on how to implement the same functionality.

The use case is a search box to search a wide array of different types and we want each term to be looked up against each field. I looked up multi term/multi field queries but it looks like I have to know in advance what each term is (first term is a firstname, second term is a last name, third term is a phone number, etc.) and I don't have such knowledge in advance.

Any help would be greatly appreciated, thanks!

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