opensearch-project / opensearch-project/opensearch-java

[FEATURE] BulkRequest estimated size

Open
#638 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Is your feature request related to a problem?

The RestHighLevelClient had a convenience method on BulkRequest that allowed us to dynamically batch bulk operations without exceeding OpenSearch's max request size.

What solution would you like?

Is this available in the current client? If not, can it be added? I don't mind porting the old implementation if needed.

What alternatives have you considered?

I'm implementing it myself but I have to use reflection to access private fields on UpdateOperationData such as the script to get its length if I don't want to serialize it just to get its size and then have the library reserialize it again when it sends it as part of the request.

Do you have any additional context?

Nope!

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 by comparing the old RestHighLevelClient BulkRequest convenience method with the current BulkRequest and UpdateOperationData APIs. Check how bulk operations are serialized and how request size could be estimated without repeated serialization; done means callers can batch operations without exceeding OpenSearch's maximum request size.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.