-
Notifications
You must be signed in to change notification settings - Fork 732
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 POST to send bulk requests #1010
Comments
Good point. No reason to use PUT here, but elasticsearch handle them exactly the same. The official PHP client is also using POST. |
I think you right and it must be synced and POST more right in this case, so +1 for POST. @hakman Did you face with real problem when PUT used? Or there is no something behind? |
We have a product that works as a proxy for Elasticsearch to accept and parse logs. We are also modifying our proxy, but thought this might help others in the future. |
+1 for supporting POST |
I remember there was a reason we used PUT, but I think it was related to one of the deprecated transports. So +1 on this change. |
Closing as #1011 was merged. |
A RESTful design uses PUT for updates and POST for create. Elastica uses the bulk API to create new documents:
https://github.com/ruflin/Elastica/blob/master/lib/Elastica/Bulk.php#L356
Would it be OK to change the way Elastica sends bulk requests from PUT to POST?
Elasticsearch docs also mention POST as the method for sending bulk requests, though the spec allows both:
http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html
The text was updated successfully, but these errors were encountered: