opensearch-project / opensearch-project/opensearch-java

Cluster state response strongly typed

Open
#1,791 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Is your feature request related to a problem?

Currently the call to client.cluster().state() returns a StateResponse, which is just a wrapper around JsonData. This means that there are no actual types in the response and I have to parse the json response on my own. This would make sense in a low level rest client, but feels out of place in this strongly typed high level java client.

What solution would you like?

Having properly formatted and typed response for cluster().state() calls.

What alternatives have you considered?

I am now parsing the json response on my own, which works but doesn't make much sense here.

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.

Research direction

Start with the client.cluster().state() entry point and inspect StateResponse, especially its JsonData wrapper. Compare the response with other strongly typed cluster APIs and identify the cluster-state fields that need representation. Done means cluster().state() exposes a properly typed response and tests cover its deserialization.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.