opensearch-project / opensearch-project/opensearch-java
[FEATURE] BulkRequest estimated size
Nobody has claimed this yet.
- 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
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 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