Skip to content

Commit 8fc3fa8

Browse files
authored
Merge branch 'main' into enhancement/add_ilm_explain_age_in_millis
2 parents 5a3e9fe + 1585c4b commit 8fc3fa8

File tree

166 files changed

+4561
-766
lines changed

Some content is hidden

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

166 files changed

+4561
-766
lines changed

benchmarks/src/test/java/org/elasticsearch/benchmark/vector/JDKVectorInt7uBenchmarkTests.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
1313

14+
import org.apache.lucene.util.Constants;
1415
import org.elasticsearch.test.ESTestCase;
16+
import org.junit.BeforeClass;
1517
import org.openjdk.jmh.annotations.Param;
1618

1719
import java.util.Arrays;
@@ -25,6 +27,15 @@ public JDKVectorInt7uBenchmarkTests(int size) {
2527
this.size = size;
2628
}
2729

30+
@BeforeClass
31+
public static void skipWindows() {
32+
assumeFalse("doesn't work on windows yet", Constants.WINDOWS);
33+
}
34+
35+
static boolean supportsHeapSegments() {
36+
return Runtime.version().feature() >= 22;
37+
}
38+
2839
public void testDotProduct() {
2940
for (int i = 0; i < 100; i++) {
3041
var bench = new JDKVectorInt7uBenchmark();
@@ -33,8 +44,10 @@ public void testDotProduct() {
3344
try {
3445
float expected = dotProductScalar(bench.byteArrayA, bench.byteArrayB);
3546
assertEquals(expected, bench.dotProductLucene(), delta);
36-
assertEquals(expected, bench.dotProductNativeWithHeapSeg(), delta);
3747
assertEquals(expected, bench.dotProductNativeWithNativeSeg(), delta);
48+
if (supportsHeapSegments()) {
49+
assertEquals(expected, bench.dotProductNativeWithHeapSeg(), delta);
50+
}
3851
} finally {
3952
bench.teardown();
4053
}

build-tools-internal/src/test/java/org/elasticsearch/gradle/internal/release/ReleaseNotesGeneratorTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.util.Objects;
2020

2121
import static org.elasticsearch.gradle.internal.release.GenerateReleaseNotesTask.getSortedBundlesWithUniqueChangelogs;
22+
import static org.hamcrest.Matchers.arrayContaining;
2223
import static org.hamcrest.Matchers.equalTo;
2324
import static org.junit.Assert.assertFalse;
2425
import static org.junit.Assert.assertThat;
@@ -100,7 +101,10 @@ public void testTemplate(String templateFilename, String outputFilename, List<Ch
100101
writeResource(outputFile, actualOutput);
101102
assertFalse("UPDATE_EXPECTED_OUTPUT should be set back to false after updating output", UPDATE_EXPECTED_OUTPUT);
102103
} else {
103-
assertThat(actualOutput, equalTo(expectedOutput));
104+
String[] expectedLines = expectedOutput.replace("\r", "").split("\n");
105+
String[] actualLines = actualOutput.split("\n");
106+
107+
assertThat(actualLines, arrayContaining(expectedLines));
104108
}
105109
}
106110

docs/changelog/129945.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 129945
2+
summary: "Enhancement: ILM sets `indexing_complete` to true from `ReadOnly` action"
3+
area: ILM+SLM
4+
type: enhancement
5+
issues: []

docs/changelog/130251.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 130251
2+
summary: Speed up (filtered) KNN queries for flat vector fields
3+
area: Vector Search
4+
type: enhancement
5+
issues: []

docs/changelog/130308.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 130308
2+
summary: Force niofs for fdt tmp file read access when flushing stored fields
3+
area: Logs
4+
type: bug
5+
issues: []

docs/changelog/130330.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 130330
2+
summary: "TopNOperator, release Row on failure"
3+
area: ES|QL
4+
type: bug
5+
issues:
6+
- 130215

docs/reference/elasticsearch/index-settings/index-block.md

Lines changed: 0 additions & 207 deletions
Original file line numberDiff line numberDiff line change
@@ -39,210 +39,3 @@ $$$index-blocks-write$$$
3939
`index.blocks.metadata`
4040
: Set to `true` to disable index metadata reads and writes.
4141

42-
43-
## Add index block API [add-index-block]
44-
45-
Adds an index block to an index.
46-
47-
```console
48-
PUT /my-index-000001/_block/write
49-
```
50-
51-
52-
### {{api-request-title}} [add-index-block-api-request]
53-
54-
`PUT /<index>/_block/<block>`
55-
56-
57-
### {{api-path-parms-title}} [add-index-block-api-path-params]
58-
59-
`<index>`
60-
: (Optional, string) Comma-separated list or wildcard expression of index names used to limit the request.
61-
62-
By default, you must explicitly name the indices you are adding blocks to. To allow the adding of blocks to indices with `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to `false`. You can update this setting in the `elasticsearch.yml` file or using the [cluster update settings](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings) API.
63-
64-
65-
`<block>`
66-
: (Required, string) Block type to add to the index.
67-
68-
**Valid values**:
69-
70-
`metadata`
71-
: Disable metadata changes, such as closing the index.
72-
73-
`read`
74-
: Disable read operations.
75-
76-
`read_only`
77-
: Disable write operations and metadata changes.
78-
79-
`write`
80-
: Disable write operations. However, metadata changes are still allowed.
81-
82-
::::
83-
84-
85-
86-
### {{api-query-parms-title}} [add-index-block-api-query-params]
87-
88-
`allow_no_indices`
89-
: (Optional, Boolean) If `false`, the request returns an error if any wildcard expression, [index alias](docs-content://manage-data/data-store/aliases.md), or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
90-
91-
Defaults to `true`.
92-
93-
94-
`expand_wildcards`
95-
: (Optional, string) Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are:
96-
97-
`all`
98-
: Match any data stream or index, including [hidden](/reference/elasticsearch/rest-apis/api-conventions.md#multi-hidden) ones.
99-
100-
`open`
101-
: Match open, non-hidden indices. Also matches any non-hidden data stream.
102-
103-
`closed`
104-
: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
105-
106-
`hidden`
107-
: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or both.
108-
109-
`none`
110-
: Wildcard patterns are not accepted.
111-
112-
Defaults to `open`.
113-
114-
115-
`ignore_unavailable`
116-
: (Optional, Boolean) If `false`, the request returns an error if it targets a missing or closed index. Defaults to `false`.
117-
118-
`master_timeout`
119-
: (Optional, [time units](/reference/elasticsearch/rest-apis/api-conventions.md#time-units)) Period to wait for the master node. If the master node is not available before the timeout expires, the request fails and returns an error. Defaults to `30s`. Can also be set to `-1` to indicate that the request should never timeout.
120-
121-
`timeout`
122-
: (Optional, [time units](/reference/elasticsearch/rest-apis/api-conventions.md#time-units)) Period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. Defaults to `30s`. Can also be set to `-1` to indicate that the request should never timeout.
123-
124-
125-
### {{api-examples-title}} [add-index-block-api-example]
126-
127-
The following example shows how to add an index block:
128-
129-
```console
130-
PUT /my-index-000001/_block/write
131-
```
132-
133-
The API returns following response:
134-
135-
```console-result
136-
{
137-
"acknowledged" : true,
138-
"shards_acknowledged" : true,
139-
"indices" : [ {
140-
"name" : "my-index-000001",
141-
"blocked" : true
142-
} ]
143-
}
144-
```
145-
146-
147-
## Remove index block API [remove-index-block]
148-
149-
Removes an index block from an index.
150-
151-
```console
152-
DELETE /my-index-000001/_block/write
153-
```
154-
155-
156-
### {{api-request-title}} [remove-index-block-api-request]
157-
158-
`DELETE /<index>/_block/<block>`
159-
160-
161-
### {{api-path-parms-title}} [remove-index-block-api-path-params]
162-
163-
`<index>`
164-
: (Optional, string) Comma-separated list or wildcard expression of index names used to limit the request.
165-
166-
By default, you must explicitly name the indices you are removing blocks from. To allow the removal of blocks from indices with `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to `false`. You can update this setting in the `elasticsearch.yml` file or using the [cluster update settings](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings) API.
167-
168-
169-
`<block>`
170-
: (Required, string) Block type to remove from the index.
171-
172-
**Valid values**:
173-
174-
`metadata`
175-
: Remove metadata block, allowing metadata changes.
176-
177-
`read`
178-
: Remove read block, allowing read operations.
179-
180-
`read_only`
181-
: Remove read-only block, allowing write operations and metadata changes.
182-
183-
`write`
184-
: Remove write block, allowing write operations.
185-
186-
::::
187-
188-
189-
190-
### {{api-query-parms-title}} [remove-index-block-api-query-params]
191-
192-
`allow_no_indices`
193-
: (Optional, Boolean) If `false`, the request returns an error if any wildcard expression, [index alias](docs-content://manage-data/data-store/aliases.md), or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
194-
195-
Defaults to `true`.
196-
197-
198-
`expand_wildcards`
199-
: (Optional, string) Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are:
200-
201-
`all`
202-
: Match any data stream or index, including [hidden](/reference/elasticsearch/rest-apis/api-conventions.md#multi-hidden) ones.
203-
204-
`open`
205-
: Match open, non-hidden indices. Also matches any non-hidden data stream.
206-
207-
`closed`
208-
: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
209-
210-
`hidden`
211-
: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or both.
212-
213-
`none`
214-
: Wildcard patterns are not accepted.
215-
216-
Defaults to `open`.
217-
218-
219-
`ignore_unavailable`
220-
: (Optional, Boolean) If `false`, the request returns an error if it targets a missing or closed index. Defaults to `false`.
221-
222-
`master_timeout`
223-
: (Optional, [time units](/reference/elasticsearch/rest-apis/api-conventions.md#time-units)) Period to wait for the master node. If the master node is not available before the timeout expires, the request fails and returns an error. Defaults to `30s`. Can also be set to `-1` to indicate that the request should never timeout.
224-
225-
`timeout`
226-
: (Optional, [time units](/reference/elasticsearch/rest-apis/api-conventions.md#time-units)) Period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. Defaults to `30s`. Can also be set to `-1` to indicate that the request should never timeout.
227-
228-
229-
### {{api-examples-title}} [remove-index-block-api-example]
230-
231-
The following example shows how to remove an index block:
232-
233-
```console
234-
DELETE /my-index-000001/_block/write
235-
```
236-
237-
The API returns following response:
238-
239-
```console-result
240-
{
241-
"acknowledged" : true,
242-
"indices" : [ {
243-
"name" : "my-index-000001",
244-
"unblocked" : true
245-
} ]
246-
}
247-
```
248-

docs/reference/elasticsearch/mapping-reference/semantic-text.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ Refer
231231
to [this tutorial](docs-content://solutions/search/semantic-search/semantic-search-semantic-text.md)
232232
to learn more about semantic search using `semantic_text`.
233233

234-
## Extracting Relevant Fragments from Semantic Text [semantic-text-highlighting]
234+
## Extracting relevant fragments from semantic text [semantic-text-highlighting]
235235

236236
You can extract the most relevant fragments from a semantic text field by using
237237
the [highlight parameter](/reference/elasticsearch/rest-apis/highlighting.md) in
@@ -295,8 +295,7 @@ automatic {{infer}} and a dedicated query so you don’t need to provide further
295295
details.
296296

297297
If you want to override those defaults and customize the embeddings that
298-
`semantic_text` indexes, you can do so by modifying <<semantic-text-params,
299-
parameters>>:
298+
`semantic_text` indexes, you can do so by modifying [parameters](#semantic-text-params):
300299

301300
- Use `index_options` to specify alternate index options such as specific
302301
`dense_vector` quantization methods
@@ -398,6 +397,6 @@ PUT test-index
398397
* `semantic_text` fields are not currently supported as elements
399398
of [nested fields](/reference/elasticsearch/mapping-reference/nested.md).
400399
* `semantic_text` fields can’t currently be set as part
401-
of [Dynamic templates](docs-content://manage-data/data-store/mapping/dynamic-templates.md).
400+
of [dynamic templates](docs-content://manage-data/data-store/mapping/dynamic-templates.md).
402401
* `semantic_text` fields are not supported with Cross-Cluster Search (CCS) or
403402
Cross-Cluster Replication (CCR).
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
2+
3+
```esql
4+
FROM employees
5+
| FORK ( WHERE emp_no == 10001 )
6+
( WHERE emp_no == 10002 )
7+
| KEEP emp_no, _fork
8+
| SORT emp_no
9+
```
10+
11+
| emp_no:integer | _fork:keyword |
12+
| --- | --- |
13+
| 10001 | fork1 |
14+
| 10002 | fork2 |
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
2+
3+
```esql
4+
FROM books METADATA _score
5+
| WHERE author:"Faulkner"
6+
| EVAL score = round(_score, 2)
7+
| FORK (SORT score DESC, author | LIMIT 5 | KEEP author, score)
8+
(STATS total = COUNT(*))
9+
| SORT _fork, score DESC, author
10+
```
11+
12+
| author:text | score:double | _fork:keyword | total:long |
13+
| --- | --- | --- | --- |
14+
| William Faulkner | 2.39 | fork1 | null |
15+
| William Faulkner | 2.39 | fork1 | null |
16+
| Colleen Faulkner | 1.59 | fork1 | null |
17+
| Danny Faulkner | 1.59 | fork1 | null |
18+
| Keith Faulkner | 1.59 | fork1 | null |
19+
| null | null | fork2 | 18 |

0 commit comments

Comments
 (0)