-
Notifications
You must be signed in to change notification settings - Fork 603
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[API] Fixed the incorrect
create
method
Previously, the "Create" API has required the `:id` argument, although it is _not_ required [https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#_automatic_id_generation]. The REST API specs list it as required, though: <https://github.com/elastic/elasticsearch/blob/b47b399f000fce42eac0e00b9fdcf969122660ab/rest-api-spec/src/main/resources/rest-api-spec/api/create.json#L11> This patch changes the logic of calling the `index` API method: when the `:id` is present, it adds the `op_type` parameter, if it's missing, it simply calls the `index` method with parameters "as is". Closes #491 (cherry picked from commit b1a8482)
- Loading branch information
Showing
3 changed files
with
47 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters