Skip to content

Commit db9fccb

Browse files
committed
Merge remote-tracking branch 'origin/main' into structured_source
2 parents dfbb686 + 2381e5d commit db9fccb

File tree

98 files changed

+2593
-414
lines changed

Some content is hidden

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

98 files changed

+2593
-414
lines changed

docs/changelog/130463.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 130463
2+
summary: Refresh potential lost connections at query start for `_search`
3+
area: Search
4+
type: enhancement
5+
issues: []

docs/changelog/131236.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 131236
2+
summary: Correctly handling `download_database_on_pipeline_creation` within a pipeline
3+
processor within a default or final pipeline
4+
area: Ingest Node
5+
type: bug
6+
issues: []

docs/changelog/131395.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 131395
2+
summary: Enable failure store for newly created OTel data streams
3+
area: Data streams
4+
type: enhancement
5+
issues: []

docs/changelog/131531.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 131531
2+
summary: Integrate LIKE/RLIKE LIST with `ReplaceStringCasingWithInsensitiveRegexMatch`
3+
rule
4+
area: ES|QL
5+
type: enhancement
6+
issues: []

docs/changelog/131541.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 131541
2+
summary: Added Sample operator `NamedWritable` to plugin
3+
area: ES|QL
4+
type: bug
5+
issues: []

docs/reference/elasticsearch/index-settings/slow-log.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Events that meet the specified threshold are emitted into [{{es}} logging](docs-
2020
* If [{{es}} monitoring](docs-content://deploy-manage/monitor/stack-monitoring.md) is enabled, from [Stack Monitoring](docs-content://deploy-manage/monitor/monitoring-data/visualizing-monitoring-data.md). Slow log events have a `logger` value of `index.search.slowlog` or `index.indexing.slowlog`.
2121
* From local {{es}} service logs directory. Slow log files have a suffix of `_index_search_slowlog.json` or `_index_indexing_slowlog.json`.
2222

23+
See this [this video](https://www.youtube.com/watch?v=ulUPJshB5bU) for a walkthrough of setting and reviewing slow logs.
2324

2425
## Slow log format [slow-log-format]
2526

docs/reference/elasticsearch/jvm-settings.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,18 @@ To override the default heap size, set the minimum and maximum heap size setting
8787

8888
The heap size should be based on the available RAM:
8989

90-
* Set `Xms` and `Xmx` to no more than 50% of your total memory. {{es}} requires memory for purposes other than the JVM heap. For example, {{es}} uses off-heap buffers for efficient network communication and relies on the operating system’s filesystem cache for efficient access to files. The JVM itself also requires some memory. It’s normal for {{es}} to use more memory than the limit configured with the `Xmx` setting.
90+
* Set `Xms` and `Xmx` to no more than 50% of the total memory available to each {{es}} node. {{es}} requires memory for purposes other than the JVM heap. For example, {{es}} uses off-heap buffers for efficient network communication and relies on the operating system’s filesystem cache for efficient access to files. The JVM itself also requires some memory. It’s normal for {{es}} to use more memory than the limit configured with the `Xmx` setting.
9191

9292
::::{note}
93-
When running in a container, such as [Docker](docs-content://deploy-manage/deploy/self-managed/install-elasticsearch-with-docker.md), total memory is defined as the amount of memory visible to the container, not the total system memory on the host.
93+
When running in a container, such as [Docker](docs-content://deploy-manage/deploy/self-managed/install-elasticsearch-with-docker.md), the total memory available to {{es}} means the amount of memory available within the container, not the total system memory on the host.
94+
95+
If you are running multiple {{es}} nodes on the same host, or in the same container, the total of all the nodes' heap sizes should not exceed 50% of the total available memory.
96+
97+
Account for the memory usage of other processes running on the same host, or in the same container, when computing the total memory available to {{es}}.
98+
99+
The 50% guideline is intended as a safe upper bound on the heap size. You may find that heap sizes smaller than this maximum offer better performance, for instance by allowing your operating system to use a larger filesystem cache.
100+
101+
If you set the heap size too large, {{es}} may perform poorly and nodes may be terminated by the operating system.
94102
::::
95103

96104
* Set `Xms` and `Xmx` to no more than the threshold for compressed ordinary object pointers (oops). The exact threshold varies but 26GB is safe on most systems and can be as large as 30GB on some systems. To verify you are under the threshold, check the {{es}} log for an entry like this:

docs/reference/elasticsearch/security-privileges.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -286,22 +286,20 @@ This section lists the privileges that you can assign to a role.
286286
`create`
287287
: Privilege to index documents.
288288

289-
:::{admonition} Deprecated in 8.0
290-
Also grants the permission to update the index mapping (but not the data streams mapping), using the [updating mapping API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping) or by relying on [dynamic field mapping](docs-content://manage-data/data-store/mapping/dynamic-mapping.md). In a future major release, this privilege will not grant any mapping update permissions.
291-
:::
292-
293289
::::{note}
294290
This privilege does not restrict the index operation to the creation of documents but instead restricts API use to the index API. The index API allows a user to overwrite a previously indexed document. See the `create_doc` privilege for an alternative.
295291
::::
296292

293+
:::{important}
294+
Starting from 8.0, this privilege no longer grants the permission to update index mappings.
295+
In earlier versions, it implicitly permitted index mapping updates (excluding data stream mappings) via the [updating mapping API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping) or through [dynamic field mapping](docs-content://manage-data/data-store/mapping/dynamic-mapping.md).
296+
Mapping update capabilities will be fully removed in a future major release.
297+
:::
298+
297299

298300
`create_doc`
299301
: Privilege to index documents. It does not grant the permission to update or overwrite existing documents.
300302

301-
:::{admonition} Deprecated in 8.0
302-
Also grants the permission to update the index mapping (but not the data streams mapping), using the [updating mapping API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping) or by relying on [dynamic field mapping](docs-content://manage-data/data-store/mapping/dynamic-mapping.md). In a future major release, this privilege will not grant any mapping update permissions.
303-
:::
304-
305303
::::{note}
306304
This privilege relies on the `op_type` of indexing requests ([Index](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create) and [Bulk](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk)). When ingesting documents as a user who has the `create_doc` privilege (and no higher privilege such as `index` or `write`), you must ensure that *op_type* is set to *create* through one of the following:
307305

@@ -311,6 +309,12 @@ This section lists the privileges that you can assign to a role.
311309

312310
::::
313311

312+
:::{important}
313+
Starting from 8.0, this privilege no longer grants the permission to update index mappings.
314+
In earlier versions, it implicitly permitted index mapping updates (excluding data stream mappings) via the [updating mapping API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping) or through [dynamic field mapping](docs-content://manage-data/data-store/mapping/dynamic-mapping.md).
315+
Mapping update capabilities will be fully removed in a future major release.
316+
:::
317+
314318

315319
`create_index`
316320
: Privilege to create an index or data stream. A create index request may contain aliases to be added to the index once created. In that case the request requires the `manage` privilege as well, on both the index and the aliases names.
@@ -340,8 +344,10 @@ This section lists the privileges that you can assign to a role.
340344
`index`
341345
: Privilege to index and update documents.
342346

343-
:::{admonition} Deprecated in 8.0
344-
Also grants the permission to update the index mapping (but not the data streams mapping), using the [updating mapping API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping) or by relying on [dynamic field mapping](docs-content://manage-data/data-store/mapping/dynamic-mapping.md). In a future major release, this privilege will not grant any mapping update permissions.
347+
:::{important}
348+
Starting from 8.0, this privilege no longer grants the permission to update index mappings.
349+
In earlier versions, it implicitly permitted index mapping updates (excluding data stream mappings) via the [updating mapping API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping) or through [dynamic field mapping](docs-content://manage-data/data-store/mapping/dynamic-mapping.md).
350+
Mapping update capabilities will be fully removed in a future major release.
345351
:::
346352

347353
`maintenance`
@@ -389,8 +395,10 @@ This section lists the privileges that you can assign to a role.
389395
`write`
390396
: Privilege to perform all write operations to documents, which includes the permission to index, update, and delete documents as well as performing bulk operations, while also allowing to dynamically update the index mapping.
391397

392-
:::{admonition} Deprecated in 8.0
393-
It also grants the permission to update the index mapping (but not the data streams mapping), using the [updating mapping API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping). This will be retracted in a future major release.
398+
:::{important}
399+
Starting from 8.0, this privilege no longer grants the permission to update index mappings.
400+
In earlier versions, it implicitly permitted index mapping updates (excluding data stream mappings) via the [updating mapping API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping) or through [dynamic field mapping](docs-content://manage-data/data-store/mapping/dynamic-mapping.md).
401+
Mapping update capabilities will be fully removed in a future major release.
394402
:::
395403

396404
## Run as privilege [_run_as_privilege]
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
## `COMPLETION` [esql-completion]
2+
3+
```yaml {applies_to}
4+
serverless: preview
5+
stack: preview 9.1.0
6+
```
7+
8+
The `COMPLETION` command allows you to send prompts and context to a Large Language Model (LLM) directly within your ES|QL queries, to perform text generation tasks.
9+
10+
**Syntax**
11+
12+
```esql
13+
COMPLETION [column =] prompt WITH inference_id
14+
```
15+
16+
**Parameters**
17+
18+
`column`
19+
: (Optional) The name of the output column containing the LLM's response.
20+
If not specified, the results will be stored in a column named `completion`.
21+
If the specified column already exists, it will be overwritten with the new results.
22+
23+
`prompt`
24+
: The input text or expression used to prompt the LLM.
25+
This can be a string literal or a reference to a column containing text.
26+
27+
`inference_id`
28+
: The ID of the [inference endpoint](docs-content://explore-analyze/elastic-inference/inference-api.md) to use for the task.
29+
The inference endpoint must be configured with the `completion` task type.
30+
31+
**Description**
32+
33+
The `COMPLETION` command provides a general-purpose interface for
34+
text generation tasks using a Large Language Model (LLM) in ES|QL.
35+
36+
`COMPLETION` supports a wide range of text generation tasks. Depending on your
37+
prompt and the model you use, you can perform arbitrary text generation tasks
38+
including:
39+
40+
- Question answering
41+
- Summarization
42+
- Translation
43+
- Content rewriting
44+
- Creative generation
45+
46+
**Requirements**
47+
48+
To use this command, you must deploy your LLM model in Elasticsearch as
49+
an [≈inference endpoint](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put) with the
50+
task type `completion`.
51+
52+
**Examples**
53+
54+
Use the default column name (results stored in `completion` column):
55+
56+
```esql
57+
ROW question = "What is Elasticsearch?"
58+
| COMPLETION question WITH test_completion_model
59+
| KEEP question, completion
60+
```
61+
62+
| question:keyword | completion:keyword |
63+
|------------------------|-------------------------------------------|
64+
| What is Elasticsearch? | A distributed search and analytics engine |
65+
66+
Specify the output column (results stored in `answer` column):
67+
68+
```esql
69+
ROW question = "What is Elasticsearch?"
70+
| COMPLETION answer = question WITH test_completion_model
71+
| KEEP question, answer
72+
```
73+
74+
| question:keyword | answer:keyword |
75+
| --- | --- |
76+
| What is Elasticsearch? | A distributed search and analytics engine |
77+
78+
Summarize the top 10 highest-rated movies using a prompt:
79+
80+
```esql
81+
FROM movies
82+
| SORT rating DESC
83+
| LIMIT 10
84+
| EVAL prompt = CONCAT(
85+
"Summarize this movie using the following information: \n",
86+
"Title: ", title, "\n",
87+
"Synopsis: ", synopsis, "\n",
88+
"Actors: ", MV_CONCAT(actors, ", "), "\n",
89+
)
90+
| COMPLETION summary = prompt WITH test_completion_model
91+
| KEEP title, summary, rating
92+
```
93+
94+
95+
| title:keyword | summary:keyword | rating:double |
96+
| --- | --- | --- |
97+
| The Shawshank Redemption | A tale of hope and redemption in prison. | 9.3 |
98+
| The Godfather | A mafia family's rise and fall. | 9.2 |
99+
| The Dark Knight | Batman battles the Joker in Gotham. | 9.0 |
100+
| Pulp Fiction | Interconnected crime stories with dark humor. | 8.9 |
101+
| Fight Club | A man starts an underground fight club. | 8.8 |
102+
| Inception | A thief steals secrets through dreams. | 8.8 |
103+
| The Matrix | A hacker discovers reality is a simulation. | 8.7 |
104+
| Parasite | Class conflict between two families. | 8.6 |
105+
| Interstellar | A team explores space to save humanity. | 8.6 |
106+
| The Prestige | Rival magicians engage in dangerous competition. | 8.5 |

docs/reference/query-languages/esql/_snippets/lists/processing-commands.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
* [preview] [`CHANGE_POINT`](../../commands/processing-commands.md#esql-change_point)
2+
* [preview] [`COMPLETION`](../../commands/processing-commands.md#esql-completion)
23
* [`DISSECT`](../../commands/processing-commands.md#esql-dissect)
34
* [`DROP`](../../commands/processing-commands.md#esql-drop)
45
* [`ENRICH`](../../commands/processing-commands.md#esql-enrich)

0 commit comments

Comments
 (0)