Skip to content

Commit 43a81c3

Browse files
authored
Merge branch 'main' into bootstrap-entitlements-for-testing
2 parents adc928b + 1e6473a commit 43a81c3

File tree

156 files changed

+3990
-694
lines changed

Some content is hidden

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

156 files changed

+3990
-694
lines changed

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/127223.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 127223
2+
summary: Wrap ES KNN queries with PatienceKNN query
3+
area: Vector Search
4+
type: feature
5+
issues: []

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/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/changelog/130344.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 130344
2+
summary: "Fix queries with missing index, `skip_unavailable` and filters"
3+
area: ES|QL
4+
type: bug
5+
issues: []

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,3 +259,6 @@ $$$index-esql-stored-fields-sequential-proportion$$$
259259

260260
`index.esql.stored_fields_sequential_proportion`
261261
: Tuning parameter for deciding when {{esql}} will load [Stored fields](/reference/elasticsearch/rest-apis/retrieve-selected-fields.md#stored-fields) using a strategy tuned for loading dense sequence of documents. Allows values between 0.0 and 1.0 and defaults to 0.2. Indices with documents smaller than 10kb may see speed improvements loading `text` fields by setting this lower.
262+
263+
$$$index-dense-vector-hnsw-early-termination$$$ `index.dense_vector.hnsw_early_termination`
264+
: Whether to apply _patience_ based early termination strategy to knn queries over HNSW graphs (see [paper](https://cs.uwaterloo.ca/~jimmylin/publications/Teofili_Lin_ECIR2025.pdf)). This is only applicable to `dense_vector` fields with `hnsw`, `int8_hnsw`, `int4_hnsw` and `bbq_hnsw` index types. Defaults to `false`.
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 |
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
## `FORK` [esql-fork]
2+
3+
```yaml {applies_to}
4+
serverless: preview
5+
stack: preview 9.1.0
6+
```
7+
8+
The `FORK` processing command creates multiple execution branches to operate
9+
on the same input data and combines the results in a single output table.
10+
11+
**Syntax**
12+
13+
```esql
14+
FORK ( <processing_commands> ) ( <processing_commands> ) ... ( <processing_commands> )
15+
```
16+
17+
**Description**
18+
19+
The `FORK` processing command creates multiple execution branches to operate
20+
on the same input data and combines the results in a single output table. A discriminator column (`_fork`) is added to identify which branch each row came from.
21+
22+
**Branch identification:**
23+
- The `_fork` column identifies each branch with values like `fork1`, `fork2`, `fork3`
24+
- Values correspond to the order branches are defined
25+
- `fork1` always indicates the first branch
26+
27+
**Column handling:**
28+
- `FORK` branches can output different columns
29+
- Columns with the same name must have the same data type across all branches
30+
- Missing columns are filled with `null` values
31+
32+
**Row ordering:**
33+
- `FORK` preserves row order within each branch
34+
- Rows from different branches may be interleaved
35+
- Use `SORT _fork` to group results by branch
36+
37+
::::{note}
38+
`FORK` branches default to `LIMIT 1000` if no `LIMIT` is provided.
39+
::::
40+
41+
**Limitations**
42+
43+
- `FORK` supports at most 8 execution branches.
44+
- Using remote cluster references and `FORK` is not supported.
45+
- Using more than one `FORK` command in a query is not supported.
46+
47+
**Examples**
48+
49+
In the following example, each `FORK` branch returns one row.
50+
Notice how `FORK` adds a `_fork` column that indicates which row the branch originates from:
51+
52+
:::{include} ../examples/fork.csv-spec/simpleFork.md
53+
54+
The next example, returns total number of rows that match the query along with
55+
the top five rows sorted by score.
56+
57+
:::{include} ../examples/fork.csv-spec/simpleForkWithStats.md

0 commit comments

Comments
 (0)