opensearch-project / opensearch-project/opensearch-java

[BUG] minIndexAge, minPrimaryShardSize and other such params are of type 'Number' but should be string

Open
#1,747 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

What is the bug?

minIndexAge, minPrimaryShardSize and other such params are of type 'Number' but should be string as opensearch requires it be of format "5m", "1d" etc.

java-client/src/generated/java/org/opensearch/client/opensearch/ism/ActionRollover.java

/** * The minimum index age to trigger rollover. * <p> * API name: {@code min_index_age} * </p> */ @Nullable public final Number minIndexAge() { return this.minIndexAge; }

Error: failed to parse setting [min_index_age] with value [300000.0] as a time value: unit is missing or unrecognized

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 java-client/src/generated/java/org/opensearch/client/opensearch/ism/ActionRollover.java and inspect the declarations for minIndexAge, minPrimaryShardSize, and related parameters. Check how these values are represented in the generated client, then verify that rollover requests preserve duration strings such as "5m" and "1d" instead of numeric values; done means OpenSearch accepts the setting without the reported parsing error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.