Open kien-truong opened 10 years ago
Are all the params which are possible for Document also possible for Script?
If I read the docs correctly, at least the following params are supported routing
, parent
, timeout
, replication
, consistency
, percolate
, refresh
, fields
, retry_on_conflict
.
You can verify it here, at the bottom of the page http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-update.html
So in a way we should mix the query params below line https://github.com/ruflin/Elastica/blob/master/lib/Elastica/Client.php#L316 because here we have Script and Document. Can you open a pull request with these changes and probably add some tests to make sure it works?
The current code only set query parameters if
$data
is of typeDocument
https://github.com/ruflin/Elastica/blob/master/lib/Elastica/Client.php#L278