Skip to content

Scope#import with options[:preprocess] throws exception when preprocessed data returns empty #719

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

Closed
RonaldKlaus opened this issue Jun 13, 2017 · 0 comments

Comments

@RonaldKlaus
Copy link

RonaldKlaus commented Jun 13, 2017

Hej!

I have a model person and I want to import all published people. All not yet published people will be rejected from the batch in the preprocess. So it is possible, that all items will be removed from the batch and I am sending an empty batch. That will throw the following exception:

Elasticsearch::Transport::Transport::Errors::BadRequest: [400] {"error":{"root_cause":[{"type":"parse_exception","reason":"Failed to derive xcontent"}],"type":"parse_exception","reason":"Failed to derive xcontent"},"status":400}

I think the behavior should be like import empty scoped data.

@RonaldKlaus RonaldKlaus changed the title Scope#import with options[:preprocess] throws exception when preprocessed data will be empty Scope#import with options[:preprocess] throws exception when preprocessed data returns empty Jun 13, 2017
timbleck pushed a commit to moviepilot-de/elasticsearch-rails that referenced this issue Jun 15, 2017
@estolfo estolfo closed this as completed in b72da17 Sep 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant