Skip to content

Comma-separated index matching #396

@eugenesk24

Description

@eugenesk24

Is your feature request related to a problem? Please describe.
Users need the ability to query multiple indices with different names.

Describe the solution you'd like
Support for comma-separated index matching

Describe alternatives you've considered
We currently have the ability to use the wildcard pattern but this limits users to only include indices with similar naming schemas.

Additional context
Currently this works,

PUT /name/_doc/1
{
  "field": "123"
}

PUT /name_different/_doc/1
{
  "different_field": "abc"
}

POST /_plugins/_ppl
{
  "query" : """
          source = name* | fields different_field
        """
}

which gives,

{
  "schema": [
    {
      "name": "different_field",
      "type": "string"
    }
  ],
  "datarows": [
    [
      null
    ],
    [
      "abc"
    ]
  ],
  "total": 2,
  "size": 2
}

But this does not,

PUT /name/_doc/1
{
  "totally_field": "123"
}

PUT /name_different/_doc/1
{
  "different_field": "abc"
}

POST /_plugins/_ppl
{
  "query" : """
          source = name, name_different | fields different_field
        """
}

which gives,

{
  "error": {
    "reason": "Invalid Query",
    "details": "Failed to parse query due to offending symbol [,] at: '\n          source = name,' <--- HERE... More details: Expecting tokens in {<EOF>, '|', '.'}",
    "type": "SyntaxCheckException"
  },
  "status": 400
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions