-
Notifications
You must be signed in to change notification settings - Fork 18
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
Change return type of executing bulk request #205
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jlcanela,
I would like to thank you for your contribution! Amazing work overall!
Besides several remarks in the code, I would like to point out that BulkResponse
is a package private class, and therefore, I'm not sure it can be used from the app - you can try it in our example app.
We have private[elasticsearch]
for internal Elastic responses, and our practice is to have a separate class for the library responses - you can check the result
package. We should identify what is the most important info for the bulk response and define BulkResult
which will be public.
modules/library/src/main/scala/zio/elasticsearch/executor/HttpExecutor.scala
Outdated
Show resolved
Hide resolved
modules/library/src/main/scala/zio/elasticsearch/executor/response/BulkResponse.scala
Outdated
Show resolved
Hide resolved
Thank you for your kind remarks. |
A good practice with ElasticSearch when bulk insert is to verify the status for each Bulk response item so that it’s possible to retry this item associated request if necessary. Current bulk request returning Unit prevents such practice.
This PR: