opensearch-project / opensearch-project/opensearch-java
[PROPOSAL] support rebuild or deep copy on SearchRequest.Builder
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 165
- Forks
- 250
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 26
Description
What/Why
What are you proposing?
Rebuild or deep copy is supported for SearchRequest.Builder. It seems tough but supported in opensearch rest client, but there seems to be no way to support it in opensearch java(refer).
What users have asked for this feature?
What problems are you trying to solve?
I want to run a query multiple times by adding only some values to an already prepared SearchRequest. For example, rerun the query by dynamically changing only the index or from field value.
What is the developer experience going to be?
Create a SearchRequest based on it. And for every query, SearchRequest.Builder is recreated and all field values set are put back in and built.
Are there any security considerations?
Are there any breaking changes to the API
What is the user experience going to be?
Are there breaking changes to the User Experience?
Why should it be built? Any reason not to?
What will it take to execute?
Any remaining open questions?
I wonder why you restricted SearchRequest.Builder to only build once.
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 reading the SearchRequest.Builder API and the referenced OpenSearch issue comment to understand the existing build-once restriction. Define whether rebuild or deep copy is required, then verify that a prepared request can be rerun with changed index or from-field values without resetting other fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100