From 42f5d38d9b78767fe7e6252d4f5347519c3c8eea Mon Sep 17 00:00:00 2001 From: Tanguy Leroux Date: Thu, 10 Sep 2020 16:51:28 +0200 Subject: [PATCH] Remove REST APIs documentation for experimental Searchable Snapshot APIs (#62217) (#62231) This commit removes the documentation for some specific Searchable Snapshot REST APIs: - clear cache - searchable snapshot stats - repository stats These APIs are low-level and are useful to investigate the behavior of snapshot backed indices but we expect them to be removed in the future or to appear in a different form. --- docs/reference/rest-api/index.asciidoc | 2 - .../apis/clear-cache.asciidoc | 76 ------------------- .../apis/get-stats.asciidoc | 76 ------------------- .../apis/mount-snapshot.asciidoc | 2 +- .../apis/repository-stats.asciidoc | 73 ------------------ .../apis/searchable-snapshots-apis.asciidoc | 6 -- .../api/searchable_snapshots.clear_cache.json | 2 +- ...searchable_snapshots.repository_stats.json | 2 +- .../api/searchable_snapshots.stats.json | 2 +- 9 files changed, 4 insertions(+), 237 deletions(-) delete mode 100644 docs/reference/searchable-snapshots/apis/clear-cache.asciidoc delete mode 100644 docs/reference/searchable-snapshots/apis/get-stats.asciidoc delete mode 100644 docs/reference/searchable-snapshots/apis/repository-stats.asciidoc diff --git a/docs/reference/rest-api/index.asciidoc b/docs/reference/rest-api/index.asciidoc index cfe21493308..538598e33cd 100644 --- a/docs/reference/rest-api/index.asciidoc +++ b/docs/reference/rest-api/index.asciidoc @@ -33,9 +33,7 @@ endif::[] * <> * <> * <> -ifdef::permanently-unreleased-branch[] * <> -endif::[] * <> * <> * <> diff --git a/docs/reference/searchable-snapshots/apis/clear-cache.asciidoc b/docs/reference/searchable-snapshots/apis/clear-cache.asciidoc deleted file mode 100644 index bd599d9beff..00000000000 --- a/docs/reference/searchable-snapshots/apis/clear-cache.asciidoc +++ /dev/null @@ -1,76 +0,0 @@ -[role="xpack"] -[testenv="enterprise"] -[[searchable-snapshots-api-clear-cache]] -=== Clear cache API -++++ -Clear cache -++++ - -experimental[] - -Clear the cache of searchable snapshots. - -[[searchable-snapshots-api-clear-cache-request]] -==== {api-request-title} - -`POST /_searchable_snapshots/cache/clear` - -`POST //_searchable_snapshots/cache/clear` - -[[searchable-snapshots-api-clear-cache-prereqs]] -==== {api-prereq-title} - -If the {es} {security-features} are enabled, you must have the -`manage` cluster privilege and the `manage` index privilege -for any included indices to use this API. -For more information, see <>. - -[[searchable-snapshots-api-clear-cache-desc]] -==== {api-description-title} - - -[[searchable-snapshots-api-clear-cache-path-params]] -==== {api-path-parms-title} - -``:: -(Optional, string) -A comma-separated list of data streams and indices for which the -searchable snapshots cache must be cleared. - - -[[searchable-snapshots-api-clear-cache-example]] -==== {api-examples-title} -//// -[source,console] ------------------------------------ -PUT /docs -{ - "settings" : { - "index.number_of_shards" : 1, - "index.number_of_replicas" : 0 - } -} - -PUT /_snapshot/my_repository/my_snapshot?wait_for_completion=true -{ - "include_global_state": false, - "indices": "docs" -} - -DELETE /docs - -POST /_snapshot/my_repository/my_snapshot/_mount?wait_for_completion=true -{ - "index": "docs" -} ------------------------------------ -// TEST[setup:setup-repository] -//// - -Clears the cache of the index `docs`: - -[source,console] --------------------------------------------------- -POST /docs/_searchable_snapshots/cache/clear --------------------------------------------------- -// TEST[continued] diff --git a/docs/reference/searchable-snapshots/apis/get-stats.asciidoc b/docs/reference/searchable-snapshots/apis/get-stats.asciidoc deleted file mode 100644 index ca2ffa4b99d..00000000000 --- a/docs/reference/searchable-snapshots/apis/get-stats.asciidoc +++ /dev/null @@ -1,76 +0,0 @@ -[role="xpack"] -[testenv="enterprise"] -[[searchable-snapshots-api-stats]] -=== Searchable snapshot statistics API -++++ -Searchable snapshot statistics -++++ - -experimental[] - -Retrieve various statistics about searchable snapshots. - -[[searchable-snapshots-api-stats-request]] -==== {api-request-title} - -`GET /_searchable_snapshots/stats` - -`GET //_searchable_snapshots/stats` - -[[searchable-snapshots-api-stats-prereqs]] -==== {api-prereq-title} - -If the {es} {security-features} are enabled, you must have the -`manage` cluster privilege and the `manage` index privilege -for any included indices to use this API. -For more information, see <>. - -[[searchable-snapshots-api-stats-desc]] -==== {api-description-title} - - -[[searchable-snapshots-api-stats-path-params]] -==== {api-path-parms-title} - -``:: -(Optional, string) -A comma-separated list of data streams and indices for which the -statistics must be retrieved. - - -[[searchable-snapshots-api-stats-example]] -==== {api-examples-title} -//// -[source,console] ------------------------------------ -PUT /docs -{ - "settings" : { - "index.number_of_shards" : 1, - "index.number_of_replicas" : 0 - } -} - -PUT /_snapshot/my_repository/my_snapshot?wait_for_completion=true -{ - "include_global_state": false, - "indices": "docs" -} - -DELETE /docs - -POST /_snapshot/my_repository/my_snapshot/_mount?wait_for_completion=true -{ - "index": "docs" -} ------------------------------------ -// TEST[setup:setup-repository] -//// - -Retrieves the statistics of the index `docs`: - -[source,console] --------------------------------------------------- -GET /docs/_searchable_snapshots/stats --------------------------------------------------- -// TEST[continued] diff --git a/docs/reference/searchable-snapshots/apis/mount-snapshot.asciidoc b/docs/reference/searchable-snapshots/apis/mount-snapshot.asciidoc index c9f882953d3..49d86ef60c2 100644 --- a/docs/reference/searchable-snapshots/apis/mount-snapshot.asciidoc +++ b/docs/reference/searchable-snapshots/apis/mount-snapshot.asciidoc @@ -8,7 +8,7 @@ experimental[] -Mount a snapshot as a searchable index. +Mount a snapshot as a snapshot backed index. [[searchable-snapshots-api-mount-request]] ==== {api-request-title} diff --git a/docs/reference/searchable-snapshots/apis/repository-stats.asciidoc b/docs/reference/searchable-snapshots/apis/repository-stats.asciidoc deleted file mode 100644 index a8a3693afa0..00000000000 --- a/docs/reference/searchable-snapshots/apis/repository-stats.asciidoc +++ /dev/null @@ -1,73 +0,0 @@ -[role="xpack"] -[testenv="enterprise"] -[[searchable-snapshots-repository-stats]] -=== Searchable snapshot repository statistics API -++++ -Searchable snapshot repository statistics -++++ - -experimental[] - -Retrieve usage statistics about a snapshot repository. - -[[searchable-snapshots-repository-stats-request]] -==== {api-request-title} - -`GET /_snapshot//_stats` - -[[searchable-snapshots-repository-stats-prereqs]] -==== {api-prereq-title} - -If the {es} {security-features} are enabled, you must have the -`manage` cluster privilege and the `manage` index privilege -for any included indices to use this API. -For more information, see <>. - -[[searchable-snapshots-repository-stats-desc]] -==== {api-description-title} - - -[[searchable-snapshots-repository-stats-path-params]] -==== {api-path-parms-title} - -``:: -(Required, string) -The repository for which to retrieve stats. - - -[[searchable-snapshots-repository-stats-example]] -==== {api-examples-title} -//// -[source,console] ------------------------------------ -PUT /docs -{ - "settings" : { - "index.number_of_shards" : 1, - "index.number_of_replicas" : 0 - } -} - -PUT /_snapshot/my_repository/my_snapshot?wait_for_completion=true -{ - "include_global_state": false, - "indices": "docs" -} - -DELETE /docs - -POST /_snapshot/my_repository/my_snapshot/_mount?wait_for_completion=true -{ - "index": "docs" -} ------------------------------------ -// TEST[setup:setup-repository] -//// - -Retrieves the statistics of the repository `my_repository`: - -[source,console] --------------------------------------------------- -GET /_snapshot/my_repository/_stats --------------------------------------------------- -// TEST[continued] diff --git a/docs/reference/searchable-snapshots/apis/searchable-snapshots-apis.asciidoc b/docs/reference/searchable-snapshots/apis/searchable-snapshots-apis.asciidoc index 65d82855178..ef8aa1e6699 100644 --- a/docs/reference/searchable-snapshots/apis/searchable-snapshots-apis.asciidoc +++ b/docs/reference/searchable-snapshots/apis/searchable-snapshots-apis.asciidoc @@ -8,11 +8,5 @@ experimental[] You can use the following APIs to perform searchable snapshots operations. * <> -* <> -* <> -* <> include::mount-snapshot.asciidoc[] -include::clear-cache.asciidoc[] -include::get-stats.asciidoc[] -include::repository-stats.asciidoc[] diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/searchable_snapshots.clear_cache.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/searchable_snapshots.clear_cache.json index 9dc9f424bea..b5d8610372c 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/searchable_snapshots.clear_cache.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/searchable_snapshots.clear_cache.json @@ -1,7 +1,7 @@ { "searchable_snapshots.clear_cache": { "documentation": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-api-clear-cache.html", + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html", "description" : "Clear the cache of searchable snapshots." }, "stability": "experimental", diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/searchable_snapshots.repository_stats.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/searchable_snapshots.repository_stats.json index a04bd0dbab6..5e150be971d 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/searchable_snapshots.repository_stats.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/searchable_snapshots.repository_stats.json @@ -1,7 +1,7 @@ { "searchable_snapshots.repository_stats": { "documentation": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-repository-stats.html", + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html", "description": "Retrieve usage statistics about a snapshot repository." }, "stability": "experimental", diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/searchable_snapshots.stats.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/searchable_snapshots.stats.json index b75903a45cd..db13c1260f8 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/searchable_snapshots.stats.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/searchable_snapshots.stats.json @@ -1,7 +1,7 @@ { "searchable_snapshots.stats": { "documentation": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-api-stats.html", + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html", "description": "Retrieve various statistics about searchable snapshots." }, "stability": "experimental",