Skip to content

Commit aeeffa7

Browse files
committed
Generate output
1 parent e4f5df1 commit aeeffa7

16 files changed

+555
-263
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 81 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/openapi/elasticsearch-serverless-openapi.json

Lines changed: 44 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 321 additions & 161 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_doc_ids/table.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,13 @@ indices-put-mapping,https://www.elastic.co/guide/en/elasticsearch/reference/{bra
258258
indices-recovery,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-recovery.html
259259
indices-refresh,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-refresh.html
260260
indices-reload-analyzers,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-reload-analyzers.html
261+
indices-resolve-cluster-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-resolve-cluster-api.html
261262
indices-resolve-index-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-resolve-index-api.html
262263
indices-rollover-index,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-rollover-index.html
263264
indices-segments,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-segments.html
264265
indices-shards-stores,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-shards-stores.html
265266
indices-shrink-index,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-shrink-index.html
267+
indices-simulate-template,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-simulate-template.html
266268
indices-split-index,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-split-index.html
267269
indices-stats,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-stats.html
268270
indices-template-exists-v1,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-template-exists-v1.html

specification/indices/put_mapping/IndicesPutMappingRequest.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@ import { Duration } from '@_types/Time'
4040

4141
/**
4242
* Update field mappings.
43-
* Adds new fields to an existing data stream or index.
43+
* Add new fields to an existing data stream or index.
4444
* You can also use this API to change the search settings of existing fields.
4545
* For data streams, these changes are applied to all backing indices by default.
4646
* @rest_spec_name indices.put_mapping
4747
* @availability stack stability=stable
4848
* @availability serverless stability=stable visibility=public
49+
* @doc_id indices-put-mapping
50+
* @index_privileges manage
4951
*/
5052
export interface Request extends RequestBase {
5153
path_parts: {

specification/indices/refresh/IndicesRefreshRequest.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,22 @@ import { ExpandWildcards, Indices } from '@_types/common'
2424
* Refresh an index.
2525
* A refresh makes recent operations performed on one or more indices available for search.
2626
* For data streams, the API runs the refresh operation on the stream’s backing indices.
27+
*
28+
* By default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds.
29+
* You can change this default interval with the `index.refresh_interval` setting.
30+
*
31+
* Refresh requests are synchronous and do not return a response until the refresh operation completes.
32+
*
33+
* Refreshes are resource-intensive.
34+
* To ensure good cluster performance, it's recommended to wait for Elasticsearch's periodic refresh rather than performing an explicit refresh when possible.
35+
*
36+
* If your application workflow indexes documents and then runs a search to retrieve the indexed document, it's recommended to use the index API's `refresh=wait_for` query parameter option.
37+
* This option ensures the indexing operation waits for a periodic refresh before running the search.
2738
* @rest_spec_name indices.refresh
2839
* @availability stack stability=stable
2940
* @availability serverless stability=stable visibility=public
41+
* @doc_id indices-refresh
42+
* @index_privileges maintenance
3043
*/
3144
export interface Request extends RequestBase {
3245
path_parts: {

specification/indices/resolve_cluster/ResolveClusterRequest.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,21 @@ import { ExpandWildcards, Names } from '@_types/common'
3838
* * Whether the search is likely to have errors returned when you do the cross-cluster search (including any authorization errors if you do not have permission to query the index).
3939
* * Cluster version information, including the Elasticsearch server version.
4040
*
41+
* For example, `GET /_resolve/cluster/my-index-*,cluster*:my-index-*` returns information about the local cluster and all remotely configured clusters that start with the alias `cluster*`.
42+
* Each cluster returns information about whether it has any indices, aliases or data streams that match `my-index-*`.
43+
*
44+
* **Advantages of using this endpoint before a cross-cluster search**
45+
*
46+
* You may want to exclude a cluster or index from a search when:
47+
*
48+
* * A remote cluster is not currently connected and is configured with `skip_unavailable=false`. Running a cross-cluster search under those conditions will cause the entire search to fail.
49+
* * A cluster has no matching indices, aliases or data streams for the index expression (or your user does not have permissions to search them). For example, suppose your index expression is `logs*,remote1:logs*` and the remote1 cluster has no indices, aliases or data streams that match `logs*`. In that case, that cluster will return no results from that cluster if you include it in a cross-cluster search.
50+
* * The index expression (combined with any query parameters you specify) will likely cause an exception to be thrown when you do the search. In these cases, the "error" field in the `_resolve/cluster` response will be present. (This is also where security/permission errors will be shown.)
51+
* * A remote cluster is an older version that does not support the feature you want to use in your search.
4152
* @rest_spec_name indices.resolve_cluster
4253
* @availability stack since=8.13.0 stability=stable
54+
* @doc_id indices-resolve-cluster-api
55+
* @index_privileges view_index_metadata
4356
*/
4457
export interface Request extends RequestBase {
4558
path_parts: {

specification/indices/resolve_cluster/ResolveClusterResponse.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class ResolveClusterInfo {
3535
*/
3636
connected: boolean
3737
/**
38-
* The skip_unavailable setting for a remote cluster.
38+
* The `skip_unavailable` setting for a remote cluster.
3939
*/
4040
skip_unavailable: boolean
4141
/**
@@ -45,7 +45,7 @@ export class ResolveClusterInfo {
4545
matching_indices?: boolean
4646
/**
4747
* Provides error messages that are likely to occur if you do a search with this index expression
48-
* on the specified cluster (e.g., lack of security privileges to query an index).
48+
* on the specified cluster (for example, lack of security privileges to query an index).
4949
*/
5050
error?: string
5151
/**

specification/indices/resolve_cluster/ResolveClusterResponseExample1.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# summary:
2-
description: A successful response for resolving a specified index expression to return information about each cluster.
1+
summary: Resolve with wildcards
2+
description: >
3+
A successful response from `GET /_resolve/cluster/my-index*,clust*:my-index*`.
4+
Each cluster has its own response section. The cluster you sent the request to is labelled as "(local)".
35
# type: response
46
# response_code: 200
57
value:
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
summary: Identify search problems
2+
# indices/resolve-cluster.asciidoc:213
3+
description: >
4+
A successful response from `GET /_resolve/cluster/not-present,clust*:my-index*,oldcluster:*?ignore_unavailable=false`.
5+
This type of request can be used to identify potential problems with your cross-cluster search.
6+
The local cluster has no index called `not_present`. Searching with `ignore_unavailable=false` would return a "no such index" error.
7+
The `cluster_one` remote cluster has no indices that match the pattern `my-index*`.
8+
There may be no indices that match the pattern or the index could be closed.
9+
The `cluster_two` remote cluster is not connected (the attempt to connect failed). Since this cluster is marked as `skip_unavailable=false`, you should probably exclude this cluster from the search by adding `-cluster_two:*` to the search index expression.
10+
The `oldcluster` remote cluster shows that it has matching indices, but no version information is included. This indicates that the cluster version predates the introduction of the `_resolve/cluster` API, so you may want to exclude it from your cross-cluster search.
11+
# type: response
12+
# response_code: 200
13+
value:
14+
"{\n \"(local)\": {\n \"connected\": true,\n \"skip_unavailable\": false,\n\
15+
\ \"error\": \"no such index [not_present]\"\n },\n \"cluster_one\": {\n \
16+
\ \"connected\": true,\n \"skip_unavailable\": true,\n \"matching_indices\"\
17+
: false,\n \"version\": {\n \"number\": \"8.13.0\",\n \"build_flavor\"\
18+
: \"default\",\n \"minimum_wire_compatibility_version\": \"7.17.0\",\n \
19+
\ \"minimum_index_compatibility_version\": \"7.0.0\"\n }\n },\n \"cluster_two\"\
20+
: {\n \"connected\": false,\n \"skip_unavailable\": false,\n \"matching_indices\"\
21+
: true,\n \"version\": {\n \"number\": \"8.13.0\",\n \"build_flavor\"\
22+
: \"default\",\n \"minimum_wire_compatibility_version\": \"7.17.0\",\n \
23+
\ \"minimum_index_compatibility_version\": \"7.0.0\"\n }\n },\n \"oldcluster\"\
24+
: {\n \"connected\": true,\n \"skip_unavailable\": false,\n \"matching_indices\"\
25+
: true\n }\n}"

0 commit comments

Comments
 (0)