-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PROPOSAL] support rebuild or deep copy on SearchRequest.Builder #583
Comments
@kdh6429 The This feature request seems reasonable to me. The general pattern I've seen is to add something like a
Would that meet your use case? |
Yes, it would be very satisfying if this were implemented. |
We also have a similar use case. We need to dynamically add an additional query filter to an already build SearchRequest. It would be great if you can also add a toBuilder() method on: Can you please give us a rough estimation when this enhancement can be expected? |
@assafcoh I don't think anyone is working on this, would you like to pitch in? |
@dblock unfortunately I do not have time to work on this. However I believe this issue should be given higher priority since it is necessary for many projects (I found several issues with similar feature request). Thank you. |
Hello, I'm interested in this solution and tried the But there is a limitation and it does not work for my use case which is:
Any better idea on how to handle that case ? I was thinking that the most simple would be to have a copy/clone method directly on the I could manage in my own code all the attributes of the Thanks |
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.
The text was updated successfully, but these errors were encountered: