Skip to content

[BUG] Field mapped in only some indices fails shards with opaque "Failed to get value for parameter ?N" #5947

Open

Description

@Swiddis

What is the bug?
When a pushed-down script reads a field that one index in the pattern doesn't map, that index's shard fails with Failed to get value for parameter ?0 instead of reading the field as null, and aggregates come back wrong.

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

  1. Create two indices. Only the first maps rt.
curl -s -X PUT localhost:9200/mixdemo_a -H 'Content-Type: application/json' \
  -d '{"mappings":{"properties":{"rt":{"type":"keyword"}}}}' | jq .acknowledged
curl -s -X PUT localhost:9200/mixdemo_b -H 'Content-Type: application/json' \
  -d '{"mappings":{"properties":{"other":{"type":"long"}}}}' | jq .acknowledged
  1. Index one doc into each.
curl -s -X POST 'localhost:9200/mixdemo_a/_doc?refresh=true' -H 'Content-Type: application/json' -d '{"rt":"12.5"}' | jq .result
curl -s -X POST 'localhost:9200/mixdemo_b/_doc?refresh=true' -H 'Content-Type: application/json' -d '{"other":1}' | jq .result
  1. Count docs while casting rt. The count is 1, not 2, and the mixdemo_b shard fails.
curl -s -X POST localhost:9200/_plugins/_ppl -H 'Content-Type: application/json' \
  -d '{"query":"source=mixdemo_* | eval t = cast(rt as double) | stats count() as n, max(t) as mx"}' \
  | jq -c '{datarows, warnings}'
# {"datarows":[[1,12.5]],"warnings":[{"type":"PARTIAL_RESULT","message":"Results are partial: 1 of 2 shards failed.",
#  "detail":"_shards: total 2, successful 1, skipped 0, failed 1; failures: [[mixdemo_b][0] IllegalStateException: Failed to get value for parameter ?0]"}]}

What is the expected behavior?
n is 2 and there's no shard failure: rt reads as null on mixdemo_b, the same as a doc that lacks the field. When a shard does fail, the message should say why.

What is your host/environment?

  • mainline (3.10.0-SNAPSHOT), single node

Do you have any screenshots?
N/A

Do you have any additional context?

Activity

  1. added
    bug
    on Nov 11, 2026
  2. added
    error-experience
    and removed on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugerror-experience

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions