signal/tire — comment on commit fa3decee35d20a326d465627e62176f56037ccfb
File:  line 0
By karmi:

Ah, OK. That makes sense, actually.

The proper solution seems to be a bit more thorough:

1. First, yeah, `Index#bulk_store` should definitely re-raise the exception. Whoever does not want to be so strict can then rescue the exception.
2. `Index#import`, on the other hand, should swallow the exception by default, so the original behaviour is preserved.
3. `Index#import` takes an option `:raise_exceptions`, _false_ by default, which enable the end-user to choose how much strict the import process will be. Strict for you, relaxed for someone else.
4. `Index#import` should return statistics about the import process, as a Hash. This would make it possible to display statistics on the count of succesful/failed documents, etc.

That seems to me like a proper way to handle this. What do you think?

Two additional questions:

1. Are you using the import method, or the bulk_store method directly?
2. How did you manage to pass the [corresponding test case](https://github.com/karmi/tire/blob/master/test/unit/index_test.rb#L352) for your patch? .)