Skip to content

Conversation

@olcbean
Copy link
Contributor

@olcbean olcbean commented Nov 10, 2017

Removing outdated parameters to index and _create; adding missing op_type to _create.

Relates to #27158

@elasticmachine
Copy link
Collaborator

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?

@olcbean olcbean force-pushed the rest_api_spec_index branch from 0452fee to 000dc52 Compare November 10, 2017 22:29
@dnhatn dnhatn added the >docs General docs changes label Nov 10, 2017
@dnhatn
Copy link
Member

dnhatn commented Nov 10, 2017

@elasticmachine please test this.

@dnhatn dnhatn added :Core/Infra/REST API REST infrastructure and utilities >non-issue labels Nov 10, 2017
"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": {
Copy link
Member

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.

Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Contributor Author

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"
},
Copy link
Member

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!

@olcbean
Copy link
Contributor Author

olcbean commented Nov 13, 2017

op_type removed for _create

@olcbean
Copy link
Contributor Author

olcbean commented Dec 19, 2017

@Mpdreamz @javanna can you have another look?

@Mpdreamz
Copy link
Member

LGTM but has now been superseded by: https://github.com/elastic/elasticsearch/pull/27888/files

Thanks for the nudge @olcbean

@javanna
Copy link
Member

javanna commented Jan 16, 2018

I think this can be closed, was superseded by #27888

@javanna javanna closed this Jan 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/REST API REST infrastructure and utilities >docs General docs changes >non-issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants