Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comma-separated index matching #396

Closed
eugenesk24 opened this issue Jan 26, 2022 · 0 comments
Closed

Comma-separated index matching #396

eugenesk24 opened this issue Jan 26, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request v1.3.0

Comments

@eugenesk24
Copy link
Contributor

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
}
@eugenesk24 eugenesk24 added the enhancement New feature or request label Jan 26, 2022
@joshuali925 joshuali925 self-assigned this Jan 26, 2022
@penghuo penghuo added the v1.3.0 label Mar 8, 2022
andy-k-improving pushed a commit to Bit-Quill/opensearch-project-sql that referenced this issue Nov 16, 2024
Signed-off-by: Navneet Verma <navneev@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v1.3.0
Projects
None yet
Development

No branches or pull requests

3 participants