Skip to content

[BUG] Index patterns in nested collection queries #1542

@parked-toes

Description

@parked-toes

What is the bug?

Using wildcards in index name works for simple queries only. Self-joined queries fail. More details in index-patterns-for-querying-nested-collection discussion:

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Use sample data from:
    https://opensearch.org/docs/latest/search-plugins/sql/sql/partiql/

Map array of object as nested type.

  1. Query nested collection using index pattern employees* :
SELECT e.name AS employeeName,
       p.name AS projectName
FROM employees* AS e,
       e.projects AS p
WHERE p.name LIKE '%security%'

Result:

{
  "error": {
    "reason": "There was internal problem at backend",
    "details": "Index type [employees*] does not exist",
    "type": "IllegalArgumentException"
  },
  "status": 500
}

What is the expected behavior?
Search all indexes matching a given pattern

What is your host/environment?
2.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingerror-experienceIssues related to how we handle failure cases in the plugin.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions