-
Notifications
You must be signed in to change notification settings - Fork 244
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
Fix for bulk indexing error (#20) plus TTL addition #21
Conversation
Hey Aaron, good change. I don't know what the etiquette is for breaking changes. Should we put something on the readme? |
Yes, i feel really bad about the breaking change but didn't really see a way around it. Yes, Let me add something to the Readme. Also, maybe a note about the Search DSL api being still open to changes? I continue to find new features in ES search dsl which to meet require changes. |
I like that plan. Better to break it early. Thanks. I will merge when you
|
@araddon - out of curiosity (and not fully reading the code yet), is it possible to get the responses from the bulk indexer as well? - specifically concerning responses where there errors or for checking for duplicates. Looking forward to this merge - thanks for this work. |
@dmichael , I updated the example doc to show usage to inspect the response bytes. However, @mattbaird the Also, here is how you would get the http response until that change is made: indexor := core.NewBulkIndexor(10)
// Create a custom Sendor Func, to allow inspection of response/error
indexor.BulkSendor = func(buf *bytes.Buffer) error {
req, err := api.ElasticSearchRequest("POST", "/_bulk")
if err != nil {
return err
}
req.SetBody(buf)
res, err := http.DefaultClient.Do((*http.Request)(req))
if err != nil {
return err
}
return err
}
done := make(chan bool)
indexor.Run(done) |
Awesome, thanks for the examples - so whattya think @mattbaird, can we get a merge? The current implementation of bulk in master is not completely functional/robust ... this looks to be a big improvement |
will do. On Thu, Jul 11, 2013 at 9:51 AM, David Michael notifications@github.comwrote:
|
Fix for bulk indexing error (#20) plus TTL addition
This has unit tests and addresses #20.
Also includes: