-
Notifications
You must be signed in to change notification settings - Fork 107
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
[FEATURE] Support for upsert in BulkIndexer Update action #207
Comments
It would be a needed addition to the API to complete the implementation of https://github.com/arunx2/benthos/blob/opensearch/internal/impl/opensearch/output.go |
AFAIK, all bulk requests in either are combined into one interface where requests will be sent. That is, a create, delete, update request is sent in the same format. I would like to discuss with the community in which version should be refactor?
|
@SaiSatwik, I decided to dig deeper into this issue and started digging into the source code. So, my previous post was wrong, as the source code already supports this functionality. However, it would seem non-obvious, on the other hand it gives a lot of flexibility in terms of use. In order to show how to use it, I decided to slightly tweak the integration test cases #269 . Please review and provide feedback. If this solves your problem, please close the issue. |
I merged #269, thanks! |
Is your feature request related to a problem?
In openserch Go client, 'update' action on BulkIndexerItem is not supporting 'upsert' flag currently. 'upsert' flag is used.
Upsert is used to insert a new document into a database if it does not exist, or updates an existing document if it does exist.
May be support for the flag can be provided in BulkIndexerItem type
https://github.com/opensearch-project/opensearch-go/blob/v1.1.0/opensearchutil/bulk_indexer.go#L111
What solution would you like?
Support for 'upsert' flag in BulkIndexerItem type in opensearch go client library.
What alternatives have you considered?
As of now, we use index operation for update as well so if document doesn't exist it will create a new document.
Do you have any additional context?
No
The text was updated successfully, but these errors were encountered: