浏览代码

[DOCS] Move Elasticsearch APIs to REST APIs section. (#44238) (#44372)

Moves the following API sections under the REST APIs navigations:
- API Conventions
- Document APIs
- Search APIs
- Index APIs (previously named Indices APIs)
- cat APIs
- Cluster APIs

Other supporting changes:
- Removes the previous index APIs page under REST APIs. Adds a redirect for the removed page.
- Removes several [partintro] macros so the docs build correctly.
- Changes anchors for pages that become sections of a parent page.
- Adds several redirects for existing pages that become sections of a parent page.

This commit re-applies changes from #44238. Changes from that PR were reverted due to broken links in several repos. This commit adds redirects for those broken links.
James Rodewig 6 年之前
父节点
当前提交
724769071d
共有 41 个文件被更改,包括 192 次插入85 次删除
  1. 0 4
      docs/reference/api-conventions.asciidoc
  2. 0 5
      docs/reference/cat.asciidoc
  3. 0 3
      docs/reference/cluster.asciidoc
  4. 0 5
      docs/reference/docs.asciidoc
  5. 0 12
      docs/reference/index.asciidoc
  6. 10 5
      docs/reference/indices.asciidoc
  7. 1 0
      docs/reference/indices/analyze.asciidoc
  8. 0 11
      docs/reference/indices/apis/index.asciidoc
  9. 1 1
      docs/reference/indices/flush.asciidoc
  10. 136 1
      docs/reference/redirects.asciidoc
  11. 13 2
      docs/reference/rest-api/index.asciidoc
  12. 0 5
      docs/reference/search.asciidoc
  13. 3 3
      docs/reference/search/profile.asciidoc
  14. 1 1
      docs/reference/search/request/collapse.asciidoc
  15. 1 1
      docs/reference/search/request/docvalue-fields.asciidoc
  16. 1 1
      docs/reference/search/request/explain.asciidoc
  17. 1 1
      docs/reference/search/request/from-size.asciidoc
  18. 1 1
      docs/reference/search/request/highlighting.asciidoc
  19. 1 1
      docs/reference/search/request/index-boost.asciidoc
  20. 1 1
      docs/reference/search/request/inner-hits.asciidoc
  21. 1 1
      docs/reference/search/request/min-score.asciidoc
  22. 1 1
      docs/reference/search/request/named-queries-and-filters.asciidoc
  23. 1 1
      docs/reference/search/request/post-filter.asciidoc
  24. 1 1
      docs/reference/search/request/preference.asciidoc
  25. 1 1
      docs/reference/search/request/query.asciidoc
  26. 1 1
      docs/reference/search/request/rescore.asciidoc
  27. 1 1
      docs/reference/search/request/script-fields.asciidoc
  28. 1 1
      docs/reference/search/request/scroll.asciidoc
  29. 1 1
      docs/reference/search/request/search-after.asciidoc
  30. 1 1
      docs/reference/search/request/search-type.asciidoc
  31. 1 1
      docs/reference/search/request/seq-no.asciidoc
  32. 1 1
      docs/reference/search/request/sort.asciidoc
  33. 1 1
      docs/reference/search/request/source-filtering.asciidoc
  34. 1 1
      docs/reference/search/request/stored-fields.asciidoc
  35. 1 1
      docs/reference/search/request/track-total-hits.asciidoc
  36. 1 1
      docs/reference/search/request/version.asciidoc
  37. 1 1
      docs/reference/search/suggesters/completion-suggest.asciidoc
  38. 1 1
      docs/reference/search/suggesters/context-suggest.asciidoc
  39. 1 1
      docs/reference/search/suggesters/misc.asciidoc
  40. 1 1
      docs/reference/search/suggesters/phrase-suggest.asciidoc
  41. 1 1
      docs/reference/search/suggesters/term-suggest.asciidoc

+ 0 - 4
docs/reference/api-conventions.asciidoc

@@ -1,8 +1,6 @@
 [[api-conventions]]
 = API conventions
 
-[partintro]
---
 The *Elasticsearch* REST APIs are exposed using <<modules-http,JSON over HTTP>>.
 
 The conventions listed in this chapter can be applied throughout the REST
@@ -13,8 +11,6 @@ API, unless otherwise specified.
 * <<common-options>>
 * <<url-access-control>>
 
---
-
 [[multi-index]]
 == Multiple Indices
 

+ 0 - 5
docs/reference/cat.asciidoc

@@ -1,9 +1,6 @@
 [[cat]]
 = cat APIs
 
-[partintro]
---
-
 ["float",id="intro"]
 == Introduction
 
@@ -210,8 +207,6 @@ sushi_california_roll [*avocado*]    1     1
 pizza_hawaiian        [*pineapples*] 1
 --------------------------------------------------
 
---
-
 include::cat/alias.asciidoc[]
 
 include::cat/allocation.asciidoc[]

+ 0 - 3
docs/reference/cluster.asciidoc

@@ -1,8 +1,6 @@
 [[cluster]]
 = Cluster APIs
 
-[partintro]
---
 ["float",id="cluster-nodes"]
 == Node specification
 
@@ -81,7 +79,6 @@ GET /_nodes/ra*:2
 GET /_nodes/ra*:2*
 --------------------------------------------------
 // CONSOLE
---
 
 include::cluster/health.asciidoc[]
 

+ 0 - 5
docs/reference/docs.asciidoc

@@ -1,9 +1,6 @@
 [[docs]]
 = Document APIs
 
-[partintro]
---
-
 This section starts with a short introduction to Elasticsearch's <<docs-replication,data replication model>>, followed by a
 detailed description of the following CRUD APIs:
 
@@ -23,8 +20,6 @@ detailed description of the following CRUD APIs:
 NOTE: All CRUD APIs are single-index APIs. The `index` parameter accepts a single
 index name, or an `alias` which points to a single index.
 
---
-
 include::docs/data-replication.asciidoc[]
 
 include::docs/index_.asciidoc[]

+ 0 - 12
docs/reference/index.asciidoc

@@ -24,20 +24,8 @@ include::setup/bootstrap-checks-xes.asciidoc[]
 
 include::upgrade.asciidoc[]
 
-include::api-conventions.asciidoc[]
-
-include::docs.asciidoc[]
-
-include::search.asciidoc[]
-
 include::aggregations.asciidoc[]
 
-include::indices.asciidoc[]
-
-include::cat.asciidoc[]
-
-include::cluster.asciidoc[]
-
 include::query-dsl.asciidoc[]
 
 include::scripting.asciidoc[]

+ 10 - 5
docs/reference/indices.asciidoc

@@ -1,9 +1,7 @@
 [[indices]]
 = Indices APIs
 
-[partintro]
---
-The indices APIs are used to manage individual indices,
+Index APIs are used to manage individual indices,
 index settings, aliases, mappings, and index templates.
 
 [float]
@@ -18,6 +16,9 @@ index settings, aliases, mappings, and index templates.
 * <<indices-shrink-index>>
 * <<indices-split-index>>
 * <<indices-rollover-index>>
+* <<freeze-index-api>>
+* <<unfreeze-index-api>>
+
 
 [float]
 [[mapping-management]]
@@ -57,8 +58,6 @@ index settings, aliases, mappings, and index templates.
 * <<indices-flush>>
 * <<indices-forcemerge>>
 
---
-
 include::indices/create-index.asciidoc[]
 
 include::indices/delete-index.asciidoc[]
@@ -75,6 +74,12 @@ include::indices/split-index.asciidoc[]
 
 include::indices/rollover-index.asciidoc[]
 
+:leveloffset: -1
+include::indices/apis/freeze.asciidoc[]
+
+include::indices/apis/unfreeze.asciidoc[]
+
+:leveloffset: +1
 include::indices/put-mapping.asciidoc[]
 
 include::indices/get-mapping.asciidoc[]

+ 1 - 0
docs/reference/indices/analyze.asciidoc

@@ -139,6 +139,7 @@ GET _analyze
 --------------------------------------------------
 // CONSOLE
 
+[[explain-analyze-api]]
 === Explain Analyze
 
 If you want to get more advanced details, set `explain` to `true` (defaults to `false`). It will output all token attributes for each token.

+ 0 - 11
docs/reference/indices/apis/index.asciidoc

@@ -1,11 +0,0 @@
-[[index-apis]]
-== Index APIs
-
-The index APIs are used to manage individual indices.
-
-* <<freeze-index-api>>, <<unfreeze-index-api>>
-
-See also <<indices>>.
-
-include::freeze.asciidoc[]
-include::unfreeze.asciidoc[]

+ 1 - 1
docs/reference/indices/flush.asciidoc

@@ -47,7 +47,7 @@ POST _flush
 // CONSOLE
 // TEST[s/^/PUT kimchy\nPUT elasticsearch\n/]
 
-[[indices-synced-flush]]
+[[synced-flush-api]]
 === Synced Flush
 
 Elasticsearch tracks the indexing activity of each shard. Shards that have not

+ 136 - 1
docs/reference/redirects.asciidoc

@@ -640,6 +640,142 @@ See <<ml-get-filter>> and
 See <<ml-get-calendar-event>> and 
 {stack-ov}/ml-calendars.html[Calendars and scheduled events].
 
+[role="exclude",id="index-apis"]
+=== Index APIs
+{es} index APIs are now documented in <<indices>>.
+
+[role="exclude",id="search-request-docvalue-fields"]
+=== Doc value fields parameter for request body search API
+See <<request-body-search-docvalue-fields>>.
+
+[role="exclude",id="search-request-explain"]
+=== Explain parameter for request body search API
+See <<request-body-search-explain>>.
+
+[role="exclude",id="search-request-collapse"]
+=== Collapse parameter for request body search API
+See <<request-body-search-collapse>>.
+
+[role="exclude",id="search-request-from-size"]
+=== From and size parameters for request body search API
+See <<request-body-search-from-size>>.
+
+[role="exclude",id="search-request-highlighting"]
+=== Highlight parameter for request body search API
+See <<request-body-search-highlighting>>.
+
+[role="exclude",id="search-request-index-boost"]
+=== Index boost parameter for request body search API
+See <<request-body-search-index-boost>>.
+
+[role="exclude",id="search-request-inner-hits"]
+=== Inner hits parameter for request body search API
+See <<request-body-search-inner-hits>>.
+
+[role="exclude",id="search-request-min-score"]
+=== Minimum score parameter for request body search API
+See <<request-body-search-min-score>>.
+
+[role="exclude",id="search-request-named-queries-and-filters"]
+=== Named query parameter for request body search API
+See <<request-body-search-queries-and-filters>>.
+
+[role="exclude",id="search-request-post-filter"]
+=== Post filter parameter for request body search API
+See <<request-body-search-post-filter>>.
+
+[role="exclude",id="search-request-preference"]
+=== Preference parameter for request body search API
+See <<request-body-search-preference>>.
+
+[role="exclude",id="search-request-query"]
+=== Query parameter for request body search API
+See <<request-body-search-query>>.
+
+[role="exclude",id="search-request-rescore"]
+=== Rescoring parameter for request body search API
+See <<request-body-search-rescore>>.
+
+[role="exclude",id="search-request-script-fields"]
+=== Script fields parameter for request body search API
+See <<request-body-search-script-fields>>.
+
+[role="exclude",id="search-request-scroll"]
+=== Scroll parameter for request body search API
+See <<request-body-search-scroll>>.
+
+[role="exclude",id="search-request-search-after"]
+=== Search after parameter for request body search API
+See <<request-body-search-search-after>>.
+
+[role="exclude",id="search-request-search-type"]
+=== Search type parameter for request body search API
+See <<request-body-search-search-type>>.
+
+[role="exclude",id="search-request-seq-no-primary-term"]
+=== Sequence numbers and primary terms parameter for request body search API
+See <<request-body-search-search-type>>.
+
+[role="exclude",id="search-request-sort"]
+=== Sort parameter for request body search API
+See <<request-body-search-sort>>.
+
+[role="exclude",id="search-request-source-filtering"]
+=== Source filtering parameter for request body search API
+See <<request-body-search-source-filtering>>.
+
+[role="exclude",id="search-request-stored-fields"]
+=== Stored fields parameter for request body search API
+See <<request-body-search-stored-fields>>.
+
+[role="exclude",id="search-request-track-total-hits"]
+=== Track total hits parameter for request body search API
+See <<request-body-search-track-total-hits>>.
+
+[role="exclude",id="search-request-version"]
+=== Version parameter for request body search API
+See <<request-body-search-version>>.
+
+[role="exclude",id="search-suggesters-term"]
+=== Term suggester
+See <<term-suggester>>.
+
+[role="exclude",id="search-suggesters-phrase"]
+=== Phrase suggester
+See <<phrase-suggester>>.
+
+[role="exclude",id="search-suggesters-completion"]
+=== Completion suggester
+See <<completion-suggester>>.
+
+[role="exclude",id="suggester-context"]
+=== Context suggester
+See <<context-suggester>>.
+
+[role="exclude",id="returning-suggesters-type"]
+=== Return suggester type
+See <<return-suggesters-type>>.
+
+[role="exclude",id="search-profile-queries"]
+=== Profiling queries
+See <<profiling-queries>>.
+
+[role="exclude",id="search-profile-aggregations"]
+=== Profiling aggregations
+See <<profiling-aggregations>>.
+
+[role="exclude",id="search-profile-considerations"]
+=== Profiling considerations
+See <<profiling-considerations>>.
+
+[role="exclude",id="_explain_analyze"]
+=== Explain analyze API
+See <<explain-analyze-api>>.
+
+[role="exclude",id="indices-synced-flush"]
+=== Synced flush API
+See <<synced-flush-api>>.
+
 [role="exclude",id="_repositories"]
 === Snapshot repositories
 See <<snapshots-repositories>>.
@@ -647,4 +783,3 @@ See <<snapshots-repositories>>.
 [role="exclude",id="_snapshot"]
 === Snapshot
 See <<snapshots-take-snapshot>>.
-

+ 13 - 2
docs/reference/rest-api/index.asciidoc

@@ -10,11 +10,15 @@ directly to configure and access {es} features.
 We are working on including more {es} APIs in this section. Some content might
 not be included yet.
 
+* <<docs>>
+* <<search>>
+* <<indices>>
+* <<cat>>
+* <<cluster>>
 * <<info-api,Info API>>
 * <<ccr-apis,{ccr-cap} APIs>>
 * <<data-frame-apis,{dataframe-cap} APIs>>
 * <<graph-explore-api,Graph Explore API>>
-* <<index-apis>>
 * <<indices-reload-analyzers,Reload Search Analyzers API>>
 * <<index-lifecycle-management-api,Index lifecycle management APIs>>
 * <<snapshot-lifecycle-management-api,Snapshot lifecycle management APIs>>
@@ -27,14 +31,21 @@ not be included yet.
 * <<migration-api,Migration APIs>>
 --
 
+:leveloffset: +1
+include::{es-repo-dir}/api-conventions.asciidoc[]
+include::{es-repo-dir}/docs.asciidoc[]
+include::{es-repo-dir}/search.asciidoc[]
+include::{es-repo-dir}/indices.asciidoc[]
+include::{es-repo-dir}/cat.asciidoc[]
+include::{es-repo-dir}/cluster.asciidoc[]
 
+:leveloffset: -1
 include::info.asciidoc[]
 include::{es-repo-dir}/ccr/apis/ccr-apis.asciidoc[]
 include::{es-repo-dir}/data-frames/apis/index.asciidoc[]
 include::{es-repo-dir}/graph/explore.asciidoc[]
 include::{es-repo-dir}/ilm/apis/ilm-api.asciidoc[]
 include::{es-repo-dir}/ilm/apis/slm-api.asciidoc[]
-include::{es-repo-dir}/indices/apis/index.asciidoc[]
 include::{es-repo-dir}/licensing/index.asciidoc[]
 include::{es-repo-dir}/migration/migration.asciidoc[]
 include::{es-repo-dir}/ml/apis/ml-api.asciidoc[]

+ 0 - 5
docs/reference/search.asciidoc

@@ -1,9 +1,6 @@
 [[search]]
 = Search APIs
 
-[partintro]
---
-
 Most search APIs are <<search-multi-index,multi-index>>, with the
 exception of the <<search-explain>> endpoints.
 
@@ -160,8 +157,6 @@ overloading a cluster (e.g., a default request will hit all indices in a cluster
 which could cause shard request rejections if the number of shards per node is
 high). This default value is `5`.
 
---
-
 include::search/search.asciidoc[]
 
 include::search/uri-request.asciidoc[]

+ 3 - 3
docs/reference/search/profile.asciidoc

@@ -227,7 +227,7 @@ NOTE: As with other statistics apis, the Profile API supports human readable out
 `?human=true` to the query string. In this case, the output contains the additional `time` field containing rounded,
 human readable timing information (e.g. `"time": "391,9ms"`, `"time": "123.3micros"`).
 
-[[search-profile-queries]]
+[[profiling-queries]]
 === Profiling Queries
 
 [NOTE]
@@ -693,7 +693,7 @@ ignore its children if you find the details too tricky to interpret.
 
 Hopefully this will be fixed in future iterations, but it is a tricky problem to solve and still in-progress :)
 
-[[search-profile-aggregations]]
+[[profiling-aggregations]]
 === Profiling Aggregations
 
 [[agg-section]]
@@ -868,7 +868,7 @@ The meaning of the stats are as follows:
     Records the number of invocations of the particular method.  For example, `"collect_count": 2,`
     means the `collect()` method was called on two different documents.
 
-[[search-profile-considerations]]
+[[profiling-considerations]]
 === Profiling Considerations
 
 ==== Performance Notes

+ 1 - 1
docs/reference/search/request/collapse.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-collapse]]
+[[request-body-search-collapse]]
 === Field Collapsing
 
 Allows to collapse search results based on field values.

+ 1 - 1
docs/reference/search/request/docvalue-fields.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-docvalue-fields]]
+[[request-body-search-docvalue-fields]]
 === Doc value Fields
 
 Allows to return the <<doc-values,doc value>> representation of a field for each hit, for

+ 1 - 1
docs/reference/search/request/explain.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-explain]]
+[[request-body-search-explain]]
 === Explain
 
 Enables explanation for each hit on how its score was computed.

+ 1 - 1
docs/reference/search/request/from-size.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-from-size]]
+[[request-body-search-from-size]]
 === From / Size
 
 Pagination of results can be done by using the `from` and `size`

+ 1 - 1
docs/reference/search/request/highlighting.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-highlighting]]
+[[request-body-search-highlighting]]
 === Highlighting
 
 Highlighters enable you to get highlighted snippets from one or more fields

+ 1 - 1
docs/reference/search/request/index-boost.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-index-boost]]
+[[request-body-search-index-boost]]
 === Index Boost
 
 Allows to configure different boost level per index when searching

+ 1 - 1
docs/reference/search/request/inner-hits.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-inner-hits]]
+[[request-body-search-inner-hits]]
 === Inner hits
 
 The <<parent-join, parent-join>> and <<nested, nested>> features allow the return of documents that

+ 1 - 1
docs/reference/search/request/min-score.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-min-score]]
+[[request-body-search-min-score]]
 === min_score
 
 Exclude documents which have a `_score` less than the minimum specified

+ 1 - 1
docs/reference/search/request/named-queries-and-filters.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-named-queries-and-filters]]
+[[request-body-search-queries-and-filters]]
 === Named Queries
 
 Each filter and query can accept a `_name` in its top level definition.

+ 1 - 1
docs/reference/search/request/post-filter.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-post-filter]]
+[[request-body-search-post-filter]]
 === Post filter
 
 The `post_filter` is applied to the search `hits` at the very end of a search

+ 1 - 1
docs/reference/search/request/preference.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-preference]]
+[[request-body-search-preference]]
 === Preference
 
 Controls a `preference` of the shard copies on which to execute the search.  By

+ 1 - 1
docs/reference/search/request/query.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-query]]
+[[request-body-search-query]]
 === Query
 
 The query element within the search request body allows to define a

+ 1 - 1
docs/reference/search/request/rescore.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-rescore]]
+[[request-body-search-rescore]]
 === Rescoring
 
 Rescoring can help to improve precision by reordering just the top (eg

+ 1 - 1
docs/reference/search/request/script-fields.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-script-fields]]
+[[request-body-search-script-fields]]
 === Script Fields
 
 Allows to return a <<modules-scripting,script

+ 1 - 1
docs/reference/search/request/scroll.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-scroll]]
+[[request-body-search-scroll]]
 === Scroll
 
 While a `search` request returns a single ``page'' of results, the `scroll`

+ 1 - 1
docs/reference/search/request/search-after.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-search-after]]
+[[request-body-search-search-after]]
 === Search After
 
 Pagination of results can be done by using the `from` and `size` but the cost becomes prohibitive when the deep pagination is reached.

+ 1 - 1
docs/reference/search/request/search-type.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-search-type]]
+[[request-body-search-search-type]]
 === Search Type
 
 There are different execution paths that can be done when executing a

+ 1 - 1
docs/reference/search/request/seq-no.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-seq-no-primary-term]]
+[[request-body-search-seq-no-primary-term]]
 === Sequence Numbers and Primary Term
 
 Returns the sequence number and primary term of the last modification to each search hit.

+ 1 - 1
docs/reference/search/request/sort.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-sort]]
+[[request-body-search-sort]]
 === Sort
 
 Allows you to add one or more sorts on specific fields. Each sort can be

+ 1 - 1
docs/reference/search/request/source-filtering.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-source-filtering]]
+[[request-body-search-source-filtering]]
 === Source filtering
 
 

+ 1 - 1
docs/reference/search/request/stored-fields.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-stored-fields]]
+[[request-body-search-stored-fields]]
 === Stored Fields
 
 WARNING: The `stored_fields` parameter is about fields that are explicitly marked as

+ 1 - 1
docs/reference/search/request/track-total-hits.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-track-total-hits]]
+[[request-body-search-track-total-hits]]
 === Track total hits
 
 Generally the total hit count can't be computed accurately without visiting all

+ 1 - 1
docs/reference/search/request/version.asciidoc

@@ -1,4 +1,4 @@
-[[search-request-version]]
+[[request-body-search-version]]
 === Version
 
 Returns a version for each search hit.

+ 1 - 1
docs/reference/search/suggesters/completion-suggest.asciidoc

@@ -1,4 +1,4 @@
-[[search-suggesters-completion]]
+[[completion-suggester]]
 === Completion Suggester
 
 NOTE: In order to understand the format of suggestions, please

+ 1 - 1
docs/reference/search/suggesters/context-suggest.asciidoc

@@ -1,4 +1,4 @@
-[[suggester-context]]
+[[context-suggester]]
 === Context Suggester
 
 The completion suggester considers all documents in the index, but it is often

+ 1 - 1
docs/reference/search/suggesters/misc.asciidoc

@@ -1,4 +1,4 @@
-[[returning-suggesters-type]]
+[[return-suggesters-type]]
 === Returning the type of the suggester
 
 Sometimes you need to know the exact type of a suggester in order to parse its results. The `typed_keys` parameter

+ 1 - 1
docs/reference/search/suggesters/phrase-suggest.asciidoc

@@ -1,4 +1,4 @@
-[[search-suggesters-phrase]]
+[[phrase-suggester]]
 === Phrase Suggester
 
 NOTE: In order to understand the format of suggestions, please

+ 1 - 1
docs/reference/search/suggesters/term-suggest.asciidoc

@@ -1,4 +1,4 @@
-[[search-suggesters-term]]
+[[term-suggester]]
 === Term suggester
 
 NOTE: In order to understand the format of suggestions, please