Skip to content
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

Add update documentation (#281) #427

Closed
wants to merge 1 commit into from
Closed

Conversation

timgrein
Copy link

@timgrein timgrein commented Oct 21, 2022

Just played around with the java-client today and saw, that the update documentation is missing, but already noted as TODO in #281. Played around with the update API and thought it could be helpful to add it directly to the repo.

@timgrein timgrein requested a review from swallez October 21, 2022 13:09
Copy link
Member

@swallez swallez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great update, thanks!

The change to method names in generated code should be reverted though (see comment).

Also, can you add references to this page in usage/index.asciidoc after aggregations so that it's actually included in the documentation?

@@ -500,7 +499,7 @@ public final Builder<TDocument, TPartialDocument> detectNoop(@Nullable Boolean v
* <p>
* API name: {@code doc}
*/
public final Builder<TDocument, TPartialDocument> doc(@Nullable TPartialDocument value) {
public final Builder<TDocument, TPartialDocument> document(@Nullable TPartialDocument value) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is generated from the Elasticsearch API specification and doc is the name used in the request's body.

The Java API client is generated from this API specification, and except for some rare cases we use the names used in the JSON API so that users can easily map the extensive Elasticsearch documentation to Java methods.

So please revert this change and the other ones in this file. They would be overridden at the next code generation anyway, breaking the documentation examples.

@timgrein timgrein closed this May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants