Skip to content
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

use delete_document and pass on options #671

Open
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
1 participant
@koenpunt
Copy link
Contributor

commented Feb 11, 2017

The perform method accepts an options hash, but this hash wasn't passed on to the API method.
Also, it was unclear to me why not to use the more high level delete_document method instead of the delete method of the client, so I've updated that as well.

I think the switch case/when can also be replaced with a simple if;

%w(index update delete).include?(operation.to_s)

koenpunt added some commits Feb 11, 2017

use delete_document and pass on options
the perform method accepted an options hash, but this hash wasn't passed on to the API method.
also, it was unclear to me why not to use the more high level delete_document method instead of the delete method of the client, so I've updated that as well.
keys should be symbols
the client validates the options, and won't accept strings for known keys like `index`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.