-
Notifications
You must be signed in to change notification settings - Fork 25k
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
rest-api-spec
: update index parameters to reflect the code base
#27346
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
… `op_type` to `_create`
0452fee
to
000dc52
Compare
@elasticmachine please test this. |
@@ -27,6 +27,12 @@ | |||
"type" : "string", | |||
"description" : "Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)" | |||
}, | |||
"op_type": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in two minds documenting this parameter on _create
, while perhaps technically correct it makes little sense to ever send _create?optype=index
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea, let's not do this. create
is a different api in the spec that implicitly has optype
set to create
. optype
should not be exposed then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that _create?op_type=index
does not make any sense, but the server will accept it.
@javanna do you mean that rest-api-spec
for _create
should not expose the op_type
or that the rest layer should validate that if an op_type
is sent, then it must be create
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean that the spec for create should not expose op_type. The REST layer could validate the op_type as well, that would be a must. I think we currently replace any existing op_type though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Mpdreamz can you have another look?
"ttl": { | ||
"type" : "time", | ||
"description" : "Expiration time for the document" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a good one, leftover unfortunately!
|
LGTM but has now been superseded by: https://github.com/elastic/elasticsearch/pull/27888/files Thanks for the nudge @olcbean |
I think this can be closed, was superseded by #27888 |
Removing outdated parameters to
index
and_create
; adding missingop_type
to_create
.Relates to #27158