use delete_document and pass on options #671

Open
wants to merge 3 commits into
from

Projects

None yet

1 participant

@koenpunt
Contributor
koenpunt commented Feb 11, 2017 edited

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
@koenpunt koenpunt 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.
c25aa44
@koenpunt koenpunt use a guard instead of a conditional block
60534a9
@koenpunt koenpunt keys should be symbols
the client validates the options, and won't accept strings for known keys like `index`
2524c2f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment