Skip to content

Commit 88c9d84

Browse files
Merge branch 'main' into fix-129148-take2
2 parents 60bc42c + bd5f43f commit 88c9d84

File tree

15 files changed

+323
-59
lines changed

15 files changed

+323
-59
lines changed

docs/extend/creating-classic-plugins.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,12 @@ org.example.module: # or 'ALL-UNNAMED' if the plugin is non-modular
136136
Allows code to access the filesystem, to read or write paths as specified by the entitlement's fields. The filesystem of the OS hosting {{es}} may contain sensitive files, for example credentials. Some files are meant to be always accessible to {{es}}, but plugins can not access them directly: {{es}} enforces that certain files can only be read by its core code, while some other files can not be read or written at all. A plugin is always granted `read` access to the {{es}} config directory and `read_write` access to the temp directory; if the plugin requires to read, write or access additional files or directories, it must specify them via this entitlement.
137137

138138
It is possible to specify 3 different types of file entitlement:
139-
- `path` to specify an absolute path
140-
- `relative_path` to specify a relative path. The path will be resolved via the `relative_to` field, which is used to qualify the relative path. It can be a specific {{es}} directory (`config` or `data`), or to the user home directory (`home`) (the home of the user running {{es}})
141-
- `relative_path` to specify a path resolved via the `relative_to` field, which can have the following values:
142-
- `config`: the {{es}} [config directory](https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html#config-files-location)
143-
- `data`: the {{es}} [data directory](https://www.elastic.co/guide/en/elasticsearch/reference/current/path-settings-overview.html)
144-
- `home`: the home directory of the user running {{es}}
145-
- `path_setting` to specify a path defined via an {{es}} setting. The path can be absolute or relative; in the latter case, the path will be resolved using the `basedir_if_relative` path (which can assume the same values as `relative_to`)
139+
1. `path` to specify an absolute path
140+
2. `relative_path` to specify a relative path. Use the `relative_to` field to qualify the relative path. `relative_to` accepts the following options:
141+
- `config`: the {{es}} [config directory](https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html#config-files-location)
142+
- `data`: the {{es}} [data directory](https://www.elastic.co/guide/en/elasticsearch/reference/current/path-settings-overview.html)
143+
- `home`: the home directory of the user running {{es}}
144+
3. `path_setting` to specify a path defined via an {{es}} setting. The path can be absolute or relative; in the latter case, the path will be resolved using the `basedir_if_relative` path (which can assume the same values as `relative_to`)
146145

147146
Each of the 3 types has some additional fields:
148147
- `mode` (required): can be either `read` or `read_write`

docs/reference/query-languages/esql/esql-metadata-fields.md

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,40 @@ mapped_pages:
66

77
# {{esql}} metadata fields [esql-metadata-fields]
88

9+
{{esql}} can access [metadata fields](/reference/elasticsearch/mapping-reference/document-metadata-fields.md).
910

10-
{{esql}} can access [metadata fields](/reference/elasticsearch/mapping-reference/document-metadata-fields.md). The currently supported ones are:
11-
12-
* [`_index`](/reference/elasticsearch/mapping-reference/mapping-index-field.md): the index to which the document belongs. The field is of the type [keyword](/reference/elasticsearch/mapping-reference/keyword.md).
13-
* [`_id`](/reference/elasticsearch/mapping-reference/mapping-id-field.md): the source document’s ID. The field is of the type [keyword](/reference/elasticsearch/mapping-reference/keyword.md).
14-
* `_version`: the source document’s version. The field is of the type [long](/reference/elasticsearch/mapping-reference/number.md).
15-
* [`_ignored`](/reference/elasticsearch/mapping-reference/mapping-ignored-field.md): the ignored source document fields. The field is of the type [keyword](/reference/elasticsearch/mapping-reference/keyword.md).
16-
* `_score`: when enabled, the final score assigned to each row matching an ES|QL query. Scoring will be updated when using [full text search functions](/reference/query-languages/esql/functions-operators/search-functions.md).
17-
18-
To enable the access to these fields, the [`FROM`](/reference/query-languages/esql/commands/source-commands.md#esql-from) source command needs to be provided with a dedicated directive:
11+
To access these fields, use the `METADATA` directive with the [`FROM`](/reference/query-languages/esql/commands/source-commands.md#esql-from) source command. For example:
1912

2013
```esql
2114
FROM index METADATA _index, _id
2215
```
2316

24-
Metadata fields are only available if the source of the data is an index. Consequently, `FROM` is the only source commands that supports the `METADATA` directive.
17+
## Available metadata fields
18+
19+
The following metadata fields are available in {{esql}}:
20+
21+
| Metadata field | Type | Description |
22+
|---------------|------|-------------|
23+
| [`_id`](/reference/elasticsearch/mapping-reference/mapping-id-field.md) | [keyword](/reference/elasticsearch/mapping-reference/keyword.md) | Unique document ID. |
24+
| [`_ignored`](/reference/elasticsearch/mapping-reference/mapping-ignored-field.md) | [keyword](/reference/elasticsearch/mapping-reference/keyword.md) | Names every field in a document that was ignored when the document was indexed. |
25+
| [`_index`](/reference/elasticsearch/mapping-reference/mapping-index-field.md) | [keyword](/reference/elasticsearch/mapping-reference/keyword.md) | Index name. |
26+
| `_index_mode` | [keyword](/reference/elasticsearch/mapping-reference/keyword.md) | [Index mode](/reference/elasticsearch/index-settings/index-modules.md#index-mode-setting). For example: `standard`, `lookup`, or `logsdb`. |
27+
| `_score` | [`float`](/reference/elasticsearch/mapping-reference/number.md) | Query relevance score (when enabled). Scores are updated when using [full text search functions](/reference/query-languages/esql/functions-operators/search-functions.md). |
28+
| [`_source`](/reference/elasticsearch/mapping-reference/mapping-source-field.md) | Special `_source` type | Original JSON document body passed at index time (or a reconstructed version if [synthetic `_source`](/reference/elasticsearch/mapping-reference/mapping-source-field.md#synthetic-source) is enabled). |
29+
| `_version` | [`long`](/reference/elasticsearch/mapping-reference/number.md) | Document version number |
30+
31+
## Usage and limitations
32+
33+
- Metadata fields are only available when the data source is an index
34+
- The `_source` type is not supported by functions
35+
- Only the `FROM` command supports the `METADATA` directive
36+
- Once enabled, metadata fields work like regular index fields
37+
38+
## Examples
2539

26-
Once enabled, these fields will be available to subsequent processing commands, just like other index fields:
40+
### Basic metadata usage
41+
42+
Once enabled, metadata fields are available to subsequent processing commands, just like other index fields:
2743

2844
```esql
2945
FROM ul_logs, apps METADATA _index, _version
@@ -40,6 +56,8 @@ FROM ul_logs, apps METADATA _index, _version
4056
| 14 | apps | 1 | apps_14 |
4157
| 14 | ul_logs | 1 | ul_logs_14 |
4258

59+
### Metadata fields and aggregations
60+
4361
Similar to index fields, once an aggregation is performed, a metadata field will no longer be accessible to subsequent commands, unless used as a grouping field:
4462

4563
```esql
@@ -51,3 +69,15 @@ FROM employees METADATA _index, _id
5169
| --- | --- |
5270
| 10100 | employees |
5371

72+
### Sort results by search score
73+
74+
```esql
75+
FROM products METADATA _score
76+
| WHERE MATCH(description, "wireless headphones")
77+
| SORT _score DESC
78+
| KEEP name, description, _score
79+
```
80+
81+
:::{tip}
82+
Refer to [{{esql}} for search](docs-content://solutions/search/esql-for-search.md#esql-for-search-scoring) for more information on relevance scoring and how to use `_score` in your queries.
83+
:::

docs/reference/query-languages/esql/functions-operators/search-functions.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,27 @@ mapped_pages:
66

77
# {{esql}} Search functions [esql-search-functions]
88

9+
:::{tip}
10+
Get started with {{esql}} for search use cases with
11+
our [hands-on tutorial](docs-content://solutions/search/esql-search-tutorial.md).
12+
13+
For a high-level overview of search functionalities in {{esql}}, and to learn about relevance scoring, refer to [{{esql}} for search](docs-content://solutions/search/esql-for-search.md#esql-for-search-scoring).
14+
:::
15+
16+
{{esql}} provides a set of functions for performing searching on text fields.
17+
918
Use these functions
1019
for [full-text search](docs-content://solutions/search/full-text.md)
1120
and [semantic search](docs-content://solutions/search/semantic-search/semantic-search-semantic-text.md).
1221

13-
Get started with {{esql}} for search use cases with
14-
our [hands-on tutorial](docs-content://solutions/search/esql-search-tutorial.md).
15-
1622
Full text functions can be used to
1723
match [multivalued fields](/reference/query-languages/esql/esql-multivalued-fields.md).
1824
A multivalued field that contains a value that matches a full text query is
1925
considered to match the query.
2026

2127
Full text functions are significantly more performant for text search use cases
2228
on large data sets than using pattern matching or regular expressions with
23-
`LIKE` or `RLIKE`
29+
`LIKE` or `RLIKE`.
2430

2531
See [full text search limitations](/reference/query-languages/esql/limitations.md#esql-limitations-full-text-search)
2632
for information on the limitations of full text search.

docs/release-notes/breaking-changes.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,15 @@ If you are migrating from a version prior to version 9.0, you must first upgrade
1212

1313
% ## Next version [elasticsearch-nextversion-breaking-changes]
1414

15-
```{applies_to}
16-
stack: coming 9.0.3
17-
```
1815
## 9.0.3 [elasticsearch-9.0.3-breaking-changes]
1916

2017
No breaking changes in this version.
2118

22-
```{applies_to}
23-
stack: coming 9.0.2
24-
```
2519
## 9.0.2 [elasticsearch-9.0.2-breaking-changes]
2620

2721
Snapshot/Restore:
2822
* Make S3 custom query parameter optional [#128043](https://github.com/elastic/elasticsearch/pull/128043)
2923

30-
31-
3224
## 9.0.1 [elasticsearch-9.0.1-breaking-changes]
3325

3426
No breaking changes in this version.

docs/release-notes/changelog-bundles/9.0.2.yml

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 9.0.2
2-
released: false
3-
generated: 2025-05-22T15:14:00.768080Z
2+
released: true
3+
generated: 2025-06-03T14:58:36.937148609Z
44
changelogs:
55
- pr: 126992
66
summary: Add missing `outbound_network` entitlement to x-pack-core
@@ -36,6 +36,12 @@ changelogs:
3636
type: bug
3737
issues:
3838
- 127468
39+
- pr: 127564
40+
summary: Consider inlinestats when having `field_caps` check for field names
41+
area: ES|QL
42+
type: bug
43+
issues:
44+
- 127236
3945
- pr: 127658
4046
summary: Append all data to Chat Completion buffer
4147
area: Machine Learning
@@ -133,3 +139,31 @@ changelogs:
133139
area: Data streams
134140
type: bug
135141
issues: []
142+
- pr: 128259
143+
summary: Added geometry validation for GEO types to exit early on invalid latitudes
144+
area: Geo
145+
type: bug
146+
issues:
147+
- 128234
148+
- pr: 128260
149+
summary: Fix validation NPE in Enrich and add extra @Nullable annotations
150+
area: ES|QL
151+
type: bug
152+
issues:
153+
- 126297
154+
- 126253
155+
- pr: 128320
156+
summary: Use new source loader when lower `docId` is accessed
157+
area: Codec
158+
type: bug
159+
issues: []
160+
- pr: 128327
161+
summary: Use internal user for internal inference action
162+
area: Machine Learning
163+
type: bug
164+
issues: []
165+
- pr: 128338
166+
summary: Pass timeout to chat completion
167+
area: Machine Learning
168+
type: bug
169+
issues: []

docs/release-notes/changelog-bundles/9.0.3.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 9.0.3
2-
released: false
3-
generated: 2025-06-21T00:06:16.346021604Z
2+
released: true
3+
generated: 2025-06-24T15:19:29.859630035Z
44
changelogs:
55
- pr: 120869
66
summary: Threadpool merge scheduler

docs/release-notes/deprecations.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,11 @@ To give you insight into what deprecated features you’re using, {{es}}:
1616

1717
% ## Next version [elasticsearch-nextversion-deprecations]
1818

19-
```{applies_to}
20-
stack: coming 9.0.3
21-
```
2219
## 9.0.3 [elasticsearch-9.0.3-deprecations]
2320

2421
Engine:
2522
* Deprecate `indices.merge.scheduler.use_thread_pool` setting [#129464](https://github.com/elastic/elasticsearch/pull/129464)
2623

27-
28-
29-
```{applies_to}
30-
stack: coming 9.0.2
31-
```
3224
## 9.0.2 [elasticsearch-9.0.2-deprecations]
3325

3426
No deprecations in this version.

docs/release-notes/index.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ To check for security updates, go to [Security announcements for the Elastic sta
2121
% *
2222

2323
## 9.0.3 [elasticsearch-9.0.3-release-notes]
24-
```{applies_to}
25-
stack: coming 9.0.3
26-
```
2724

2825
### Features and enhancements [elasticsearch-9.0.3-features-enhancements]
2926

@@ -92,11 +89,7 @@ Searchable Snapshots:
9289
Security:
9390
* Fix error message when changing the password for a user in the file realm [#127621](https://github.com/elastic/elasticsearch/pull/127621)
9491

95-
9692
## 9.0.2 [elasticsearch-9.0.2-release-notes]
97-
```{applies_to}
98-
stack: coming 9.0.2
99-
```
10093

10194
### Features and enhancements [elasticsearch-9.0.2-features-enhancements]
10295

@@ -114,19 +107,27 @@ Aggregations:
114107
Audit:
115108
* Handle streaming request body in audit log [#127798](https://github.com/elastic/elasticsearch/pull/127798)
116109

110+
Codec:
111+
* Use new source loader when lower `docId` is accessed [#128320](https://github.com/elastic/elasticsearch/pull/128320)
112+
117113
Data streams:
118114
* Fix system data streams incorrectly showing up in the list of template validation problems [#128161](https://github.com/elastic/elasticsearch/pull/128161)
119115

120116
Downsampling:
121117
* Downsampling does not consider passthrough fields as dimensions [#127752](https://github.com/elastic/elasticsearch/pull/127752) (issue: [#125156](https://github.com/elastic/elasticsearch/issues/125156))
122118

123119
ES|QL:
120+
* Consider inlinestats when having `field_caps` check for field names [#127564](https://github.com/elastic/elasticsearch/pull/127564) (issue: [#127236](https://github.com/elastic/elasticsearch/issues/127236))
124121
* Don't push down filters on the right hand side of an inlinejoin [#127383](https://github.com/elastic/elasticsearch/pull/127383)
125122
* ESQL: Avoid unintended attribute removal [#127563](https://github.com/elastic/elasticsearch/pull/127563) (issue: [#127468](https://github.com/elastic/elasticsearch/issues/127468))
126123
* ESQL: Fix alias removal in regex extraction with JOIN [#127687](https://github.com/elastic/elasticsearch/pull/127687) (issue: [#127467](https://github.com/elastic/elasticsearch/issues/127467))
127124
* ESQL: Keep `DROP` attributes when resolving field names [#127009](https://github.com/elastic/elasticsearch/pull/127009) (issue: [#126418](https://github.com/elastic/elasticsearch/issues/126418))
128125
* Ensure ordinal builder emit ordinal blocks [#127949](https://github.com/elastic/elasticsearch/pull/127949)
129126
* Fix union types in CCS [#128111](https://github.com/elastic/elasticsearch/pull/128111)
127+
* Fix validation NPE in Enrich and add extra @Nullable annotations [#128260](https://github.com/elastic/elasticsearch/pull/128260) (issues: [#126297](https://github.com/elastic/elasticsearch/issues/126297), [#126253](https://github.com/elastic/elasticsearch/issues/126253))
128+
129+
Geo:
130+
* Added geometry validation for GEO types to exit early on invalid latitudes [#128259](https://github.com/elastic/elasticsearch/pull/128259) (issue: [#128234](https://github.com/elastic/elasticsearch/issues/128234))
130131

131132
Infra/Core:
132133
* Add missing `outbound_network` entitlement to x-pack-core [#126992](https://github.com/elastic/elasticsearch/pull/126992) (issue: [#127003](https://github.com/elastic/elasticsearch/issues/127003))
@@ -138,6 +139,8 @@ Infra/Scripting:
138139
Machine Learning:
139140
* Append all data to Chat Completion buffer [#127658](https://github.com/elastic/elasticsearch/pull/127658)
140141
* Fix services API Google Vertex AI Rerank location field requirement [#127856](https://github.com/elastic/elasticsearch/pull/127856)
142+
* Pass timeout to chat completion [#128338](https://github.com/elastic/elasticsearch/pull/128338)
143+
* Use internal user for internal inference action [#128327](https://github.com/elastic/elasticsearch/pull/128327)
141144

142145
Relevance:
143146
* Fix: Add `NamedWriteable` for `RuleQueryRankDoc` [#128153](https://github.com/elastic/elasticsearch/pull/128153) (issue: [#126071](https://github.com/elastic/elasticsearch/issues/126071))
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the "Elastic License
4+
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
5+
* Public License v 1"; you may not use this file except in compliance with, at
6+
* your election, the "Elastic License 2.0", the "GNU Affero General Public
7+
* License v3.0 only", or the "Server Side Public License, v 1".
8+
*/
9+
10+
package org.elasticsearch.core;
11+
12+
import java.lang.annotation.ElementType;
13+
import java.lang.annotation.Retention;
14+
import java.lang.annotation.RetentionPolicy;
15+
import java.lang.annotation.Target;
16+
17+
/**
18+
* Annotation to identify a block of code (a whole class, a method, a field, or a local variable) that is intentionally not fully
19+
* project-aware because it's not intended to be used in a serverless environment. Some features are unavailable in serverless and are
20+
* thus not worth the investment to make fully project-aware. This annotation makes it easier to identify blocks of code that require
21+
* attention in case those features are revisited from a multi-project POV.
22+
*/
23+
@Retention(RetentionPolicy.SOURCE)
24+
@Target(
25+
{ ElementType.LOCAL_VARIABLE, ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD, ElementType.TYPE, ElementType.MODULE }
26+
)
27+
public @interface NotMultiProjectCapable {
28+
29+
/**
30+
* Some explanation on why the block of code would not work in a multi-project context and/or what would need to be done to make it
31+
* properly project-aware.
32+
*/
33+
String description() default "";
34+
}

muted-tests.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,12 @@ tests:
561561
method: "builds distribution from branches via archives extractedAssemble [bwcDistVersion: 8.2.1, bwcProject: bugfix, expectedAssembleTaskName:
562562
extractedAssemble, #2]"
563563
issue: https://github.com/elastic/elasticsearch/issues/119871
564-
564+
- class: org.elasticsearch.xpack.inference.qa.mixed.CohereServiceMixedIT
565+
method: testRerank
566+
issue: https://github.com/elastic/elasticsearch/issues/130009
567+
- class: org.elasticsearch.xpack.inference.qa.mixed.CohereServiceMixedIT
568+
method: testCohereEmbeddings
569+
issue: https://github.com/elastic/elasticsearch/issues/130010
565570

566571
# Examples:
567572
#

0 commit comments

Comments
 (0)