opensearch-project / opensearch-project/opensearch-java

Field capabilities request is invalid

Open
#1,792 2 comments 0 reactions 1 assignee View on GitHub

@reta is already working on this.

Since Aug 27, 2026.

bug
Dominant language
Java
Stars
165
Forks
250
Avg merge
1d 18h
Merged PRs (30d)
26

Description

What is the bug?

Field capabilities request is serializing fields as json body of the POST request. But based on documentation and my testing, fields has to be a query parameter instead.

How can one reproduce the bug?
client.fieldCaps(r -> r.allowNoIndices(true).fields("*"))

this request should return something. Instead, it's returning following error:

{
  "type": "illegal_argument_exception",
  "reason": "specified fields can't be null or empty"
}
What is the expected behavior?

Returning response with fields without errors. When building the field cap request, the fields content has to be used as query param, not body of the POST req.

What is your host/environment?

Opensearch 2.19.3 server on linux/ubuntu

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.