opensearch-project / opensearch-project/opensearch-java
Field capabilities request is invalid
Open
@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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.