[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.
This commit is contained in:
James Rodewig 2019-07-17 08:49:22 -04:00
parent 377a6a47ac
commit 34725e20fb
41 changed files with 192 additions and 85 deletions

View File

@ -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

View File

@ -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[]

View File

@ -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[]

View File

@ -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[]

View File

@ -28,20 +28,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[]

View File

@ -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[]

View File

@ -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.

View File

@ -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[]

View File

@ -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

View File

@ -626,6 +626,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>>.
@ -633,4 +769,3 @@ See <<snapshots-repositories>>.
[role="exclude",id="_snapshot"]
=== Snapshot
See <<snapshots-take-snapshot>>.

View File

@ -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[]

View File

@ -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[]

View File

@ -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

View File

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

View File

@ -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

View File

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

View File

@ -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`

View File

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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

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

View File

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

View File

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

View File

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

View File

@ -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.

View File

@ -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

View File

@ -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.

View File

@ -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

View File

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

View File

@ -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

View File

@ -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

View File

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

View File

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

View File

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

View File

@ -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

View File

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

View File

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