Code Monkey home page Code Monkey logo

Comments (5)

araddon avatar araddon commented on August 18, 2024

thank you for great writeup/finding this. I believe there was an error in the logic, i created a unit test that failed, then fixed it, also exposed some of the hidden Global indexor
araddon@b1ed1ec

Logical Error:
araddon@b1ed1ec#L0L178

Ill get a pull request in for this.

from elastigo.

dmichael avatar dmichael commented on August 18, 2024

Thanks! It was very late last night when I found this. Thanks for fixing this so fast. Ill pull and give it a whirl.

from elastigo.

insasho avatar insasho commented on August 18, 2024

Any update on this? I have a problem that may be related: the bulk indexer never finishes. Example:

var done chan bool
bulker := core.NewBulkIndexorErrors(1, 1)
bulker.Run(done)
for ... {
  ...
  bulker.Index("widgets", "widget", i, nil, widget)
}
log.Printf("flushing")
bulker.Flush()
log.Printf("waiting")
done <- true
log.Printf("done")

With any number of documents passed to bulker.Index(), this program hangs at "waiting". The done chan is never read.

Also, a suggestion: I suggest reducing the number of methods available for configuring the bulk indexer and removing the global bulk indexer and the convenience methods. There are currently too many ways to use the bulk indexer and none of them are more powerful or complex than the other. This adds unnecessary complexity to the API.

Thanks for writing this library!!

from elastigo.

mattbaird avatar mattbaird commented on August 18, 2024

Hi Insasho, did you merge Aaron's changes and retest?

Could you write a test for this?

Agreed on the API, it could be simplified. Any suggestions?

On Thu, Jul 4, 2013 at 11:21 AM, insasho [email protected] wrote:

Any update on this? I have a problem that may be related: the bulk indexer
never finishes. Example:

var done chan bool
bulker := core.NewBulkIndexorErrors(1, 1)
bulker.Run(done)
for ... {
...
bulker.Index("widgets", "widget", i, nil, widget)
}
log.Printf("flushing")
bulker.Flush()
log.Printf("waiting")
done <- true
log.Printf("done")

With any number of documents passed to bulker.Index(), this program hangs
at "waiting". The done chan is never read.

Also, a suggestion: I suggest reducing the number of methods available for
configuring the bulk indexer and removing the global bulk indexer and the
convenience methods. There are currently too many ways to use the bulk
indexer and none of them are more powerful or complex than the other. This
adds unnecessary complexity to the API.

Thanks for writing this library!!


Reply to this email directly or view it on GitHubhttps://github.com//issues/20#issuecomment-20488927
.

from elastigo.

araddon avatar araddon commented on August 18, 2024

Closed with #21

from elastigo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.