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

[Docs] Fix Java Api index administration usage #28133

Merged
merged 1 commit into from
Jan 16, 2018

Conversation

cbuescher
Copy link
Member

The Java API documentation for index administration currenty is wrong because
the PutMappingRequestBuilder#setSource(Object... source) and CreateIndexRequestBuilder#addMapping(String type, Object... source) methods
now delegate to methods that check that the input arguments are valid key/value pairs:

https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-admin-indices.html

This changes the docs so the java api code examples are included from documentation integration
tests so we detect compile and runtime issues earlier. We already do this in the high level client
documentation, but since this is a transport client only example it adds the tests to the
existing CreateIndexIT.

Closes #28131

@cbuescher cbuescher added :Data Management/Indices APIs APIs to create and manage indices and templates >test Issues or PRs that are addressing/adding tests v6.0.3 v6.1.2 v6.2.0 v6.3.0 v7.0.0 labels Jan 8, 2018
@cbuescher cbuescher requested a review from nik9000 January 8, 2018 15:43
@cbuescher
Copy link
Member Author

@nik9000 would you mind to comment, since you are most familiar with building
java api docs from tests?

Copy link
Member

@javanna javanna left a comment

Choose a reason for hiding this comment

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

LGTM assuming tests are green

@cbuescher
Copy link
Member Author

@javanna thanks a lot for the review, will merge then.

@cbuescher cbuescher merged commit 67c1f1c into elastic:master Jan 16, 2018
martijnvg added a commit that referenced this pull request Jan 16, 2018
* es/master: (30 commits)
  [Docs] Fix Java Api index administration usage (#28133)
  Fix eclipse build. (#28236)
  Never return null from Strings.tokenizeToStringArray (#28224)
  Fallback to TransportMasterNodeAction for cluster health retries (#28195)
  [Docs] Changes to ingest.asciidoc (#28212)
  TEST: Update logging for testAckedIndexing
  [GEO] Add WKT Support to GeoBoundingBoxQueryBuilder
  Painless: Add whitelist extensions (#28161)
  Fix daitch_mokotoff phonetic filter to use the dedicated Lucene filter (#28225)
  Avoid doing redundant work when checking for self references. (#26927)
  Fix casts in HotThreads. (#27578)
  Ignore the `-snapshot` suffix when comparing the Lucene version in the build and the docs. (#27927)
  Allow update of `eager_global_ordinals` on `_parent`. (#28014)
  Fix NPE on composite aggregation with sub-aggregations that need scores (#28129)
  `MockTcpTransport` to connect asynchronously (#28203)
  Fix synonym phrase query expansion for cross_fields parsing (#28045)
  Introduce elasticsearch-core jar (#28191)
  #28218: Update the Lucene version for 6.2.0 after backport
  upgrade to lucene 7.2.1 (#28218)
  [Docs] Fix an error in painless-types.asciidoc (#28221)
  ...
cbuescher pushed a commit that referenced this pull request Jan 16, 2018
The Java API documentation for index administration currenty is wrong because
the PutMappingRequestBuilder#setSource(Object... source) and
CreateIndexRequestBuilder#addMapping(String type, Object... source) methods
delegate to methods that check that the input arguments are valid key/value
pairs:

https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-admin-indices.html

This changes the docs so the java api code examples are included from
documentation integration tests so we detect compile and runtime issues earlier.

Closes #28131
cbuescher pushed a commit that referenced this pull request Jan 16, 2018
The Java API documentation for index administration currenty is wrong because
the PutMappingRequestBuilder#setSource(Object... source) and
CreateIndexRequestBuilder#addMapping(String type, Object... source) methods
delegate to methods that check that the input arguments are valid key/value
pairs:

https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-admin-indices.html

This changes the docs so the java api code examples are included from
documentation integration tests so we detect compile and runtime issues earlier.

Closes #28131
cbuescher pushed a commit that referenced this pull request Jan 16, 2018
The Java API documentation for index administration currenty is wrong because
the PutMappingRequestBuilder#setSource(Object... source) and
CreateIndexRequestBuilder#addMapping(String type, Object... source) methods
delegate to methods that check that the input arguments are valid key/value
pairs:

https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-admin-indices.html

This changes the docs so the java api code examples are included from
documentation integration tests so we detect compile and runtime issues earlier.

Closes #28131
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Jan 16, 2018
* master:
  [Docs] Fix base directory to include for put_mapping.asciidoc
  Open engine should keep only starting commit (elastic#28228)
  [Docs] Fix Java Api index administration usage (elastic#28133)
  Fix eclipse build. (elastic#28236)
  Never return null from Strings.tokenizeToStringArray (elastic#28224)
  Fallback to TransportMasterNodeAction for cluster health retries (elastic#28195)
  [Docs] Changes to ingest.asciidoc (elastic#28212)
  TEST: Update logging for testAckedIndexing
cbuescher pushed a commit that referenced this pull request Jan 16, 2018
The Java API documentation for index administration currenty is wrong because
the PutMappingRequestBuilder#setSource(Object... source) and
CreateIndexRequestBuilder#addMapping(String type, Object... source) methods
delegate to methods that check that the input arguments are valid key/value
pairs:

https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-admin-indices.html

This changes the docs so the java api code examples are included from
documentation integration tests so we detect compile and runtime issues earlier.

Closes #28131
cbuescher pushed a commit that referenced this pull request Jan 16, 2018
cbuescher pushed a commit that referenced this pull request Jan 16, 2018
cbuescher pushed a commit that referenced this pull request Jan 16, 2018
cbuescher pushed a commit that referenced this pull request Jan 16, 2018
cbuescher pushed a commit that referenced this pull request Jan 16, 2018
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Jan 16, 2018
* master:
  Revert "[Docs] Fix Java Api index administration usage (elastic#28133)"
  Revert "[Docs] Fix base directory to include for put_mapping.asciidoc"
  Added multi get api to the high level rest client.
  [Docs] Clarify numeric datatype ranges (elastic#28240)
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Jan 16, 2018
* master: (35 commits)
  Move the multi-get response tests to server
  Require JDK 9 for compilation (elastic#28071)
  Revert "[Docs] Fix Java Api index administration usage (elastic#28133)"
  Revert "[Docs] Fix base directory to include for put_mapping.asciidoc"
  Added multi get api to the high level rest client.
  [Docs] Clarify numeric datatype ranges (elastic#28240)
  [Docs] Fix base directory to include for put_mapping.asciidoc
  Open engine should keep only starting commit (elastic#28228)
  [Docs] Fix Java Api index administration usage (elastic#28133)
  Fix eclipse build. (elastic#28236)
  Never return null from Strings.tokenizeToStringArray (elastic#28224)
  Fallback to TransportMasterNodeAction for cluster health retries (elastic#28195)
  [Docs] Changes to ingest.asciidoc (elastic#28212)
  TEST: Update logging for testAckedIndexing
  [GEO] Add WKT Support to GeoBoundingBoxQueryBuilder
  Painless: Add whitelist extensions (elastic#28161)
  Fix daitch_mokotoff phonetic filter to use the dedicated Lucene filter (elastic#28225)
  Avoid doing redundant work when checking for self references. (elastic#26927)
  Fix casts in HotThreads. (elastic#27578)
  Ignore the `-snapshot` suffix when comparing the Lucene version in the build and the docs. (elastic#27927)
  ...
jasontedor added a commit that referenced this pull request Jan 17, 2018
* master:
  Fix third-party audit tasks on JDK 8
  Remove duplicated javadoc `fieldType` param
  Handle 5.6.6 and 6.1.2 release
  Introduce multi-release JAR
  Move the multi-get response tests to server
  Require JDK 9 for compilation (#28071)
  Revert "[Docs] Fix Java Api index administration usage (#28133)"
  Revert "[Docs] Fix base directory to include for put_mapping.asciidoc"
  Added multi get api to the high level rest client.
  [Docs] Clarify numeric datatype ranges (#28240)
  [Docs] Fix base directory to include for put_mapping.asciidoc
  Open engine should keep only starting commit (#28228)
jasontedor added a commit that referenced this pull request Jan 17, 2018
* 6.x:
  Fix third-party audit tasks on JDK 8
  Remove duplicated javadoc `fieldType` param
  Handle 5.6.6 and 6.1.2 release
  Introduce multi-release JAR
  Move the multi-get response tests to server
  Require JDK 9 for compilation (#28071)
  Revert "[Docs] Fix Java Api index administration usage (#28133)"
  Revert "[Docs] Fix base directory to include for put_mapping.asciidoc"
  Added multi get api to the high level rest client.
  Open engine should keep only starting commit (#28228)
  [Docs] Clarify numeric datatype ranges (#28240)
  Add migration guide for 6.1
  [Docs] Fix base directory to include for put_mapping.asciidoc
  [Docs] Fix Java Api index administration usage (#28133)
  Add 6.1.2 release notes
cbuescher pushed a commit to cbuescher/elasticsearch that referenced this pull request Mar 14, 2018
The Java API documentation for index administration currenty is wrong because
the PutMappingRequestBuilder#setSource(Object... source) an
CreateIndexRequestBuilder#addMapping(String type, Object... source) methods
delegate to methods that check that the input arguments are valid key/value
pairs:

https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-admin-indices.html

This changes the docs so the java api code examples are included from
documentation integration tests so we detect compile and runtime issues earlier.

Closes elastic#28131
@jimczi jimczi added v7.0.0-beta1 and removed v7.0.0 labels Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Indices APIs APIs to create and manage indices and templates >test Issues or PRs that are addressing/adding tests v6.0.3 v6.1.2 v6.2.0 v6.3.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants