Skip to content
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

[BUG] Bulk UpdateOperation misses upsert options #282

Closed
fs-chris opened this issue Nov 28, 2022 · 19 comments · Fixed by #353
Closed

[BUG] Bulk UpdateOperation misses upsert options #282

fs-chris opened this issue Nov 28, 2022 · 19 comments · Fixed by #353
Assignees
Labels
bug Something isn't working

Comments

@fs-chris
Copy link
Contributor

fs-chris commented Nov 28, 2022

What is the bug?

The UpdateOperation only supports setting a document.
There are no options for defining upserts like script, (scripted-)upsert, docAsUpsert etc. as in the common org.opensearch.client.opensearch.core.UpdateRequest
In Elasticsearch these settings are done for bulks via UpdateAction which can be set into the UpdateOperation.

How can one reproduce the bug?

n/a

What is the expected behavior?

Bulk UpdateOperations should support all update/upsert options as in org.opensearch.client.opensearch.core.UpdateRequest

What is your host/environment?

Windows and Linux, Java 17
OpenSearch server 2.4.0
OpenSearch client 2.1.0

Do you have any screenshots?

n/a

Do you have any additional context?

@fs-chris fs-chris added bug Something isn't working untriaged labels Nov 28, 2022
@wbeckler
Copy link

This makes sense. Are you up for a PR for this?

@fs-chris
Copy link
Contributor Author

I'm sorry, but because of the number and severity of bugs in the current version of this client I had to switch to the HLRC which appears to be more mature.
And unfortunately we currently don't have capacity to participate and provide a fix.

@assafcoh
Copy link

assafcoh commented Dec 17, 2022

Hi guys, this capability is basic and important.
Any time estimations for adding this?

@wbeckler
Copy link

Nothing is scheduled for this issue but it sounds like a blocker to deprecating the hlrc.

@fs-chris what other issues were driving you away from OpenSearch-java?

@fs-chris
Copy link
Contributor Author

Besides this one, there is another show-stopper for me: support of sub-aggregations #197

Other, less significant yet annoying issues are

To be fair, the Elasticsearch version of this client also has lots of problems which mainly originate in a wrong or incomplete data model, which often leads to missing-required-property exception that prevents getting responses for certain requests.

With OpenSearch-client, I didn't reach the point where I would trap into similar issues, since they occur at execution time only.

@dblock
Copy link
Member

dblock commented Dec 20, 2022

@fs-chris We're working towards #284 to permanently solve the missing/incomplete APIs problems. Any help appreciated.

@wbeckler
Copy link

@fs-chris in terms of #197 there's a fix merged in main that will go out with the next release, so subaggregations should work if you're willing to work with the unreleased client. It would be great if you wanted to try it out.

@fs-chris
Copy link
Contributor Author

I appreciate all work done to improve this client.
However, for now I have to struggle with HLRC to get it into our product.
I will certainly test this new client again as soon as new versions are released and the major issues are fixed.

@assafcoh
Copy link

Hi guys,
We tried the new 2.2.0 version, but noticed updating with a Script is still not supported.
This is a very basic functionality, and blocks us from using the opensearch java client :(

For example we would like to create an opensearch Script object, and use it like below:

new BulkOperation.Builder()
      .update(new UpdateOperation.Builder<DataInfo>()
              .index("my-index")
              .id("doc-123")
              .script(myScriptObj)
              .upsert(dataInfo)
              .build())
      .build()

our team would greatly appreciate your estimation regarding supporting this.

@dblock
Copy link
Member

dblock commented Jan 24, 2023

@assafcoh Try contributing this feature? What help do you need?

@assafcoh
Copy link

assafcoh commented Jan 25, 2023

unfortunately we currently don't have capacity to contribute.
This feature is a basic functionality, and is currently a blocker for us, so I guess we will have to switch to HLRC until this is supported. We will be glad to test this client as soon as this feature is supported.

@reta
Copy link
Collaborator

reta commented Jan 25, 2023

@dblock I think I could help here and look into the issue

@paniavula
Copy link

Any thoughts on which release and timeline this is targeted for?

@dblock
Copy link
Member

dblock commented Feb 7, 2023

Any thoughts on which release and timeline this is targeted for?

Next release.

@wbeckler When do you want to release next?

@wbeckler
Copy link

I think any maintainer can trigger a release and we have not decided on a set schedule for releases. @paniavula what are the implications for you in terms of the timing of the next release?

@paniavula
Copy link

I think any maintainer can trigger a release and we have not decided on a set schedule for releases. @paniavula what are the implications for you in terms of the timing of the next release?

This is a blocker for us and cannot switch to using this library as it is a core need in our current version. A more frequent monthly release schedule may also help to boost some confidence.

@reta
Copy link
Collaborator

reta commented Feb 21, 2023

@VachaShah I think nothing is stopping us from making the release, wdyt? (number of important fixes are in)

@VachaShah
Copy link
Collaborator

@VachaShah I think nothing is stopping us from making the release, wdyt? (number of important fixes are in)

Yeah nothing is blocking, we can do the next release. I will wait for some fixes that are already in PRs to go in so we can release them as well.

@VachaShah
Copy link
Collaborator

@VachaShah I think nothing is stopping us from making the release, wdyt? (number of important fixes are in)

Yeah nothing is blocking, we can do the next release. I will wait for some fixes that are already in PRs to go in so we can release them as well.

Tracking the release in #380 :)

urinud added a commit to urinud/opensearch-java that referenced this issue Jun 22, 2023
urinud added a commit to urinud/opensearch-java that referenced this issue Jun 22, 2023
Signed-off-by: Uriel Dan Nudelman <urinud@gmail.com>
urinud added a commit to urinud/opensearch-java that referenced this issue Jun 28, 2023
Signed-off-by: Uriel Dan Nudelman <urinud@gmail.com>
urinud added a commit to urinud/opensearch-java that referenced this issue Jun 28, 2023
# This is the 1st commit message:

Fixes opensearch-project#282

Signed-off-by: Uriel Dan Nudelman <urinud@gmail.com>

# This is the commit message opensearch-project#2:

Fixes opensearch-project#282

Signed-off-by: Uriel Dan Nudelman <urinud@gmail.com>

# This is the commit message opensearch-project#3:

Add UnitTests

Signed-off-by: Uriel Dan Nudelman <urinud@gmail.com>
urinud added a commit to urinud/opensearch-java that referenced this issue Jun 28, 2023
Signed-off-by: Uriel Dan Nudelman <urinud@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants