generated from amazon-archives/__template_Custom
-
Couldn't load subscription status.
- Fork 176
Closed
Labels
Description
Description
When using PPL (Piped Processing Language) to query Opensearch indices that use field aliases, the query fails to recognize the aliased field names. This prevents users from leveraging field aliases in their PPL queries, which is inconsistent with the behavior in standard Opensearch queries.
Steps to Reproduce
-
Create an Opensearch index with field aliases:
PUT /traces { "mappings": { "properties": { "trace.id": { "type": "keyword" }, "traceId": { "type": "alias", "path": "trace.id" } } } } -
Index sample data:
POST /traces/_doc { "trace.id": "abc123" } -
Attempt to query using PPL with the field alias:
POST _plugins/_ppl { "query" : "search source=traces | where traceId = 'abc123'" }
Expected Behavior
The PPL query should recognize the field alias "traceId" and successfully return the matching document.
Actual Behavior
The query fails with the following error:
{
"error": {
"reason": "Invalid Query",
"details": "can't resolve Symbol(namespace=FIELD_NAME, name=traceId) in type env",
"type": "SemanticCheckException"
},
"status": 400
}