Skip to content

Commit be35ffa

Browse files
Merge branch 'main' into StatementParserTests
2 parents 2ad3b2a + 5d18187 commit be35ffa

File tree

849 files changed

+3197
-2896
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

849 files changed

+3197
-2896
lines changed

catalog-info.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ spec:
123123
pipeline_file: .buildkite/pipelines/lucene-snapshot/build-snapshot.yml
124124
env:
125125
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: "true"
126-
SLACK_NOTIFICATIONS_CHANNEL: "#lucene"
126+
SLACK_NOTIFICATIONS_CHANNEL: "#lucene-ci"
127127
SLACK_NOTIFICATIONS_ALL_BRANCHES: "true"
128128
branch_configuration: lucene_snapshot
129129
default_branch: lucene_snapshot
@@ -167,7 +167,7 @@ spec:
167167
pipeline_file: .buildkite/pipelines/lucene-snapshot/update-branch.yml
168168
env:
169169
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: "true"
170-
SLACK_NOTIFICATIONS_CHANNEL: "#lucene"
170+
SLACK_NOTIFICATIONS_CHANNEL: "#lucene-ci"
171171
SLACK_NOTIFICATIONS_ALL_BRANCHES: "true"
172172
default_branch: lucene_snapshot
173173
teams:
@@ -210,7 +210,7 @@ spec:
210210
pipeline_file: .buildkite/pipelines/lucene-snapshot/run-tests.yml
211211
env:
212212
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: "true"
213-
SLACK_NOTIFICATIONS_CHANNEL: "#lucene"
213+
SLACK_NOTIFICATIONS_CHANNEL: "#lucene-ci"
214214
SLACK_NOTIFICATIONS_ALL_BRANCHES: "true"
215215
branch_configuration: lucene_snapshot
216216
default_branch: lucene_snapshot

docs/build.gradle

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,9 @@ buildRestTests.setups['library'] = '''
855855
856856
'''
857857
buildRestTests.setups['sensor_rollup_job'] = '''
858+
- requires:
859+
test_runner_features: [ "allowed_warnings" ]
860+
858861
- do:
859862
indices.create:
860863
index: dummy-rollup-index
@@ -885,9 +888,10 @@ buildRestTests.setups['sensor_rollup_job'] = '''
885888
node:
886889
type: keyword
887890
- do:
888-
raw:
889-
method: PUT
890-
path: _rollup/job/sensor
891+
allowed_warnings:
892+
- "The rollup functionality will be removed in Elasticsearch 10.0. See docs for more information."
893+
rollup.put_job:
894+
id: sensor
891895
body: >
892896
{
893897
"index_pattern": "sensor-*",
@@ -917,6 +921,9 @@ buildRestTests.setups['sensor_rollup_job'] = '''
917921
}
918922
'''
919923
buildRestTests.setups['sensor_started_rollup_job'] = '''
924+
- requires:
925+
test_runner_features: [ "allowed_warnings" ]
926+
920927
- do:
921928
indices.create:
922929
index: dummy-rollup-index
@@ -966,9 +973,10 @@ buildRestTests.setups['sensor_started_rollup_job'] = '''
966973
{"timestamp": 1516297294000, "temperature": 202, "voltage": 4.0, "node": "c"}
967974
968975
- do:
969-
raw:
970-
method: PUT
971-
path: _rollup/job/sensor
976+
allowed_warnings:
977+
- "The rollup functionality will be removed in Elasticsearch 10.0. See docs for more information."
978+
rollup.put_job:
979+
id: sensor
972980
body: >
973981
{
974982
"index_pattern": "sensor-*",
@@ -997,9 +1005,10 @@ buildRestTests.setups['sensor_started_rollup_job'] = '''
9971005
]
9981006
}
9991007
- do:
1000-
raw:
1001-
method: POST
1002-
path: _rollup/job/sensor/_start
1008+
allowed_warnings:
1009+
- "The rollup functionality will be removed in Elasticsearch 10.0. See docs for more information."
1010+
rollup.start_job:
1011+
id: sensor
10031012
'''
10041013

10051014
buildRestTests.setups['sensor_index'] = '''

docs/changelog/113131.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
pr: 113131
2+
summary: Emit deprecation warning when executing one of the rollup APIs
3+
area: Rollup
4+
type: deprecation
5+
issues: []
6+
deprecation:
7+
title: Emit deprecation warning when executing one of the rollup APIs
8+
area: Rollup
9+
details: Rollup is already deprecated since 8.11.0 via documentation and since 8.15.0 it is no longer possible to create new rollup jobs in clusters without rollup usage. This change updates the rollup APIs to emit a deprecation warning.
10+
impact: Returning a deprecation warning when using one of the rollup APIs.

docs/changelog/120168.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/changelog/121074.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 121074
2+
summary: Implement a `MetricsAware` interface
3+
area: ES|QL
4+
type: enhancement
5+
issues: []

docs/changelog/121119.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 121119
2+
summary: Revert "Reduce Data Loss in System Indices Migration"
3+
area: Infra/Core
4+
type: bug
5+
issues: []

docs/reference/aggregations/bucket/time-series-aggregation.asciidoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@
66

77
preview::[]
88

9-
The time series aggregation queries data created using a time series index. This is typically data such as metrics
9+
The time series aggregation queries data created using a <<tsds,Time series data stream (TSDS)>>. This is typically data such as metrics
1010
or other data streams with a time component, and requires creating an index using the time series mode.
1111

12+
[NOTE]
13+
====
14+
Refer to the <<differences-from-regular-data-stream, TSDS documentation>> to learn more about the key differences from regular data streams.
15+
====
16+
1217
//////////////////////////
1318
1419
Creating a time series mapping

docs/reference/api-conventions.asciidoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,16 @@ as they contain data essential to the operation of the system.
254254
IMPORTANT: Direct access to system indices is deprecated and
255255
will no longer be allowed in a future major version.
256256

257+
To view system indices within cluster:
258+
259+
[source,console]
260+
--------------------------------------------------
261+
GET _cluster/state/metadata?filter_path=metadata.indices.*.system
262+
--------------------------------------------------
263+
264+
WARNING: When overwriting current cluster state, system indices should be restored
265+
as part of their {ref}/snapshot-restore.html#feature-state[feature state].
266+
257267
[discrete]
258268
[[api-conventions-parameters]]
259269
=== Parameters

docs/reference/docs/update.asciidoc

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -307,23 +307,19 @@ POST test/_update/1
307307
[discrete]
308308
===== Upsert
309309

310-
If the document does not already exist, the contents of the `upsert` element
311-
are inserted as a new document. If the document exists, the
312-
`script` is executed:
310+
An upsert operation lets you update an existing document or insert a new one if it doesn't exist, in a single request.
311+
312+
In this example, if the product with ID `1` exists, its price will be updated to `100`. If the product does not exist, a new document with ID `1` and a price of `50` will be inserted.
313313

314314
[source,console]
315315
----
316-
POST test/_update/1
316+
POST /test/_update/1
317317
{
318-
"script": {
319-
"source": "ctx._source.counter += params.count",
320-
"lang": "painless",
321-
"params": {
322-
"count": 4
323-
}
318+
"doc": {
319+
"product_price": 100
324320
},
325321
"upsert": {
326-
"counter": 1
322+
"product_price": 50
327323
}
328324
}
329325
----
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
[[indices-create-index-from-source]]
2+
=== Create index from source API
3+
++++
4+
<titleabbrev>Create index from source</titleabbrev>
5+
++++
6+
7+
.New API reference
8+
[sidebar]
9+
--
10+
For the most up-to-date API details, refer to {api-es}/group/endpoint-indices[Index APIs].
11+
--
12+
13+
[[indices-create-index-from-source-api-request]]
14+
==== {api-request-title}
15+
16+
`PUT /_create_from/<source>/<dest>`
17+
18+
`POST/_create_from/<source>/<dest>`
19+
20+
[[indices-create-index-from-source-api-prereqs]]
21+
==== {api-prereq-title}
22+
23+
* If the {es} {security-features} are enabled, you must have the `manage`
24+
<<privileges-list-indices,index privilege>> for the index.
25+
26+
[[indices-create-index-from-source-api-desc]]
27+
==== {api-description-title}
28+
This api allows you to add a new index to an {es} cluster, using an existing source index as a basis for the new index.
29+
The settings and mappings from the source index will copied over to the destination index. You can also provide
30+
override settings and mappings which will be combined with the source settings and mappings when creating the
31+
destination index.
32+
33+
[[indices-create-index-from-source-api-path-params]]
34+
==== {api-path-parms-title}
35+
36+
`<source>`::
37+
(Required, string) Name of the existing source index which will be used as a basis.
38+
39+
`<dest>`::
40+
(Required, string) Name of the destination index which will be created.
41+
42+
43+
[role="child_attributes"]
44+
[[indices-create-index-from-source-api-request-body]]
45+
==== {api-request-body-title}
46+
47+
`settings_override`::
48+
(Optional, <<index-modules-settings,index setting object>>) Settings which override the source settings.
49+
50+
`mappings_override`::
51+
(Optional, <<mapping,mapping object>>) Mappings which override the source mappings.
52+
53+
`remove_index_blocks`::
54+
(Optional, boolean) Filter out any index blocks from the source index when creating the destination index.
55+
Defaults to `true`.
56+
57+
[[indices-create-index-from-source-api-example]]
58+
==== {api-examples-title}
59+
60+
Start by creating a source index that we'll copy using this API.
61+
62+
[source,console]
63+
--------------------------------------------------
64+
PUT /my-index
65+
{
66+
"settings": {
67+
"index": {
68+
"number_of_shards": 3,
69+
"blocks.write": true
70+
}
71+
},
72+
"mappings": {
73+
"properties": {
74+
"field1": { "type": "text" }
75+
}
76+
}
77+
}
78+
--------------------------------------------------
79+
// TESTSETUP
80+
81+
Now we create a destination index from the source index. This new index will have the same mappings and settings
82+
as the source index.
83+
84+
[source,console]
85+
--------------------------------------------------
86+
POST _create_from/my-index/my-new-index
87+
--------------------------------------------------
88+
89+
90+
Alternatively, we could override some of the source's settings and mappings. This will use the source settings
91+
and mappings as a basis and combine these with the overrides to create the destination settings and mappings.
92+
93+
[source,console]
94+
--------------------------------------------------
95+
POST _create_from/my-index/my-new-index
96+
{
97+
"settings_override": {
98+
"index": {
99+
"number_of_shards": 5
100+
}
101+
},
102+
"mappings_override": {
103+
"properties": {
104+
"field2": { "type": "boolean" }
105+
}
106+
}
107+
}
108+
--------------------------------------------------
109+
110+
Since the destination index is empty, we very likely will want to write into the index after creation.
111+
This would not be possible if the source index contains an <<index-block-settings,index write block>> which is copied over to the destination index.
112+
One way to handle this is to remove the index write block using a settings override. For example, the following
113+
settings override removes all index blocks.
114+
115+
116+
[source,console]
117+
--------------------------------------------------
118+
POST _create_from/my-index/my-new-index
119+
{
120+
"settings_override": {
121+
"index": {
122+
"blocks.write": null,
123+
"blocks.read": null,
124+
"blocks.read_only": null,
125+
"blocks.read_only_allow_delete": null,
126+
"blocks.metadata": null
127+
}
128+
}
129+
}
130+
--------------------------------------------------
131+
132+
Since this is a common scenario, index blocks are actually removed by default. This is controlled with the parameter
133+
`remove_index_blocks`, which defaults to `true`. If we want the destination index to contains the index blocks from
134+
the source index, we can do the following:
135+
136+
[source,console]
137+
--------------------------------------------------
138+
POST _create_from/my-index/my-new-index
139+
{
140+
"remove_index_blocks": false
141+
}
142+
--------------------------------------------------

0 commit comments

Comments
 (0)