Skip to content

SQL: querying an alias having different mappings indices generates an incorrect error message #31784

@astefan

Description

@astefan

For an alias defined as

$ curl -XGET "localhost:9200/_alias/test_alias?pretty"
{
  "test_emp_copy" : {
    "aliases" : {
      "test_alias" : { }
    }
  },
  "library" : {
    "aliases" : {
      "test_alias" : { }
    }
  },
  "test_emp" : {
    "aliases" : {
      "test_alias" : { }
    }
  }
}

the error message received is:

sql> select * from test_alias;
Bad request [Found 1 problem(s)
line 1:15: [test_alias] points to indices [library] and [library] which have different mappings. When using multiple indices, the mappings must be identical.]

(twice the library index mentioned instead of library and another index from the alias)
Those three indices mappings are like this:

  • test_emp_copy and test_emp are identical
  • library is completely different from the other two

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions