opensearch-project / opensearch-project/opensearch-java

[BUG] Add _size to PutMappingRequest

Open
#1,229 0 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?

The _size field is not present on PutMappingRequest, despite being present on TypeMapping.

This prevents enabling size tracking for existing indices.

How can one reproduce the bug?

See https://github.com/opensearch-project/opensearch-java/blob/main/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutMappingRequest.java

What is the expected behavior?

_size (or SizeField as the Java classes call it) is present on PutMappingRequest

Do you have any additional context?
  • This field is available on the dotnet version of the client
  • It would be nice if PutMappingRequest used the same TypeMapping object used for index creation.

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/main/java/org/opensearch/client/opensearch/indices/PutMappingRequest.java and compare its mapping fields with TypeMapping.java, especially the existing SizeField definition. Add the missing _size or SizeField support to PutMappingRequest and verify that the request can enable size tracking for existing indices.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.