Skip to content

Field capabilities request is invalid #1792

@todvora

Description

@todvora

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions