You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/extend/creating-classic-plugins.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -136,13 +136,12 @@ org.example.module: # or 'ALL-UNNAMED' if the plugin is non-modular
136
136
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.
137
137
138
138
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`)
146
145
147
146
Each of the 3 types has some additional fields:
148
147
- `mode` (required): can be either `read` or `read_write`
Copy file name to clipboardExpand all lines: docs/reference/query-languages/esql/esql-metadata-fields.md
+41-11Lines changed: 41 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,24 +6,40 @@ mapped_pages:
6
6
7
7
# {{esql}} metadata fields [esql-metadata-fields]
8
8
9
+
{{esql}} can access [metadata fields](/reference/elasticsearch/mapping-reference/document-metadata-fields.md).
9
10
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:
19
12
20
13
```esql
21
14
FROM index METADATA _index, _id
22
15
```
23
16
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}}:
|[`_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
25
39
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:
27
43
28
44
```esql
29
45
FROM ul_logs, apps METADATA _index, _version
@@ -40,6 +56,8 @@ FROM ul_logs, apps METADATA _index, _version
40
56
| 14 | apps | 1 | apps_14 |
41
57
| 14 | ul_logs | 1 | ul_logs_14 |
42
58
59
+
### Metadata fields and aggregations
60
+
43
61
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:
44
62
45
63
```esql
@@ -51,3 +69,15 @@ FROM employees METADATA _index, _id
51
69
| --- | --- |
52
70
| 10100 | employees |
53
71
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.
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
+
9
18
Use these functions
10
19
for [full-text search](docs-content://solutions/search/full-text.md)
11
20
and [semantic search](docs-content://solutions/search/semantic-search/semantic-search-semantic-text.md).
12
21
13
-
Get started with {{esql}} for search use cases with
Copy file name to clipboardExpand all lines: docs/release-notes/index.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,9 +21,6 @@ To check for security updates, go to [Security announcements for the Elastic sta
21
21
% *
22
22
23
23
## 9.0.3 [elasticsearch-9.0.3-release-notes]
24
-
```{applies_to}
25
-
stack: coming 9.0.3
26
-
```
27
24
28
25
### Features and enhancements [elasticsearch-9.0.3-features-enhancements]
29
26
@@ -92,11 +89,7 @@ Searchable Snapshots:
92
89
Security:
93
90
* Fix error message when changing the password for a user in the file realm [#127621](https://github.com/elastic/elasticsearch/pull/127621)
94
91
95
-
96
92
## 9.0.2 [elasticsearch-9.0.2-release-notes]
97
-
```{applies_to}
98
-
stack: coming 9.0.2
99
-
```
100
93
101
94
### Features and enhancements [elasticsearch-9.0.2-features-enhancements]
102
95
@@ -114,19 +107,27 @@ Aggregations:
114
107
Audit:
115
108
* Handle streaming request body in audit log [#127798](https://github.com/elastic/elasticsearch/pull/127798)
116
109
110
+
Codec:
111
+
* Use new source loader when lower `docId` is accessed [#128320](https://github.com/elastic/elasticsearch/pull/128320)
112
+
117
113
Data streams:
118
114
* Fix system data streams incorrectly showing up in the list of template validation problems [#128161](https://github.com/elastic/elasticsearch/pull/128161)
119
115
120
116
Downsampling:
121
117
* 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))
122
118
123
119
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))
124
121
* Don't push down filters on the right hand side of an inlinejoin [#127383](https://github.com/elastic/elasticsearch/pull/127383)
* 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))
127
124
* 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))
* 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))
130
131
131
132
Infra/Core:
132
133
* 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:
138
139
Machine Learning:
139
140
* Append all data to Chat Completion buffer [#127658](https://github.com/elastic/elasticsearch/pull/127658)
140
141
* 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)
141
144
142
145
Relevance:
143
146
* Fix: Add `NamedWriteable` for `RuleQueryRankDoc`[#128153](https://github.com/elastic/elasticsearch/pull/128153) (issue: [#126071](https://github.com/elastic/elasticsearch/issues/126071))
0 commit comments