opensearch-project / opensearch-project/opensearch-java
[BUG] minIndexAge, minPrimaryShardSize and other such params are of type 'Number' but should be string
Nobody has claimed this yet.
- 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
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.
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