Skip to content

Lookup index validity error message for ES|QL could be improved #120189

@astefan

Description

@astefan

Description

Given the following lookup index

    "settings": {
        "index": {
            "mode": "lookup"
        }
    },
    "mappings": {
        "properties": {
            "id1": {
                "type": "integer"
            }
    }

and a query FROM employees | LOOKUP JOIN test1 ON languages | KEEP emp_no, languages the error message presented invalid [test1] resolution in lookup mode to [0] indices:

  • is slightly misleading: the index test1 DOES exist and the confusion comes from [0] indices message which imo it suggests that there are no test1 indices. If I use lookup join whatever and whatever index doesn't exist the error message is Unknown index [whatever]
  • doesn't say what is the actual problem: languages field doesn't exist in index test1.
  • if test1 has index mode set as logsdb or no specific index mode, the same error message is presented, which doesn't say much about the real problem.

Actually, we have some sort of validation that refers to missing fields.
For query FROM employees | LOOKUP JOIN test1 on id1 we get Unknown column [id1] in left side of join.
For query FROM employees | LOOKUP JOIN test1 ON id1*`` we get 1:39: Unknown column [id1*] in left side of join\nline 1:39: Unknown column [id1*] in right side of join

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions