Skip to content

Commit 4ca1d50

Browse files
authored
Merge branch 'main' into EmbeddingRequestChunker-max-chunks-2
2 parents 8e644c4 + 67af069 commit 4ca1d50

File tree

105 files changed

+1821
-848
lines changed

Some content is hidden

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

105 files changed

+1821
-848
lines changed

docs/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ To re-run CI checks, an Elastic employee can select the `Re-run this job` option
4949

5050
> [!TIP]
5151
As of 9.0.0, we are currently only publishing from the `main` branch.
52-
**This means that backporting is currently not necessary for 9.0+ Elasticsearch docs.**
52+
We will continue to backport changes as usual, in case we need to revisit this approach in the future.
5353

54-
However, if you need to update the `8.x` docs, you'll have to use the old `asciidoc` system. Refer to the [`8.x` README](https://github.com/elastic/elasticsearch/blob/8.x/docs/README.asciidoc) for more information.
54+
If you need to update the `8.x` docs, you'll have to use the old `asciidoc` system. Refer to the [`8.x` README](https://github.com/elastic/elasticsearch/blob/8.x/docs/README.asciidoc) for more information.
5555

5656
> [!NOTE]
5757
> If you need to make changes to 9.x docs and 8.x docs, you'll need to use two different workflows:
5858
59-
- **For `9.x` docs**, create a PR using the new Markdown system against the `main` branch.
59+
- **For `9.x` docs**, create a PR using the new Markdown system against the `main` branch and backport as necessary.
6060
- **For `8.x` docs**, create a PR using the old AsciiDoc system against the `8.x` branch and backport the changes to any other `8.x` branches needed.
6161

6262
## Test code snippets

docs/changelog/122606.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 122606
2+
summary: Avoid serializing empty `_source` fields in mappings
3+
area: Mapping
4+
type: bug
5+
issues: []

docs/changelog/123543.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 123543
2+
summary: Enhance memory accounting for document expansion and introduce max document
3+
size limit
4+
area: CRUD
5+
type: enhancement
6+
issues: []

docs/changelog/123589.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 123589
2+
summary: Revive some more of inlinestats functionality
3+
area: ES|QL
4+
type: bug
5+
issues: []

docs/changelog/124225.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 124225
2+
summary: "[Inference API] Fix output stream ordering in `InferenceActionProxy`"
3+
area: Machine Learning
4+
type: bug
5+
issues: []

docs/reference/elasticsearch/mapping-reference/doc-values.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ Most fields are [indexed](/reference/elasticsearch/mapping-reference/mapping-ind
99

1010
Sorting, aggregations, and access to field values in scripts requires a different data access pattern. Instead of looking up the term and finding documents, we need to be able to look up the document and find the terms that it has in a field.
1111

12-
Doc values are the on-disk data structure, built at document index time, which makes this data access pattern possible. They store the same values as the `_source` but in a column-oriented fashion that is way more efficient for sorting and aggregations. Doc values are supported on almost all field types, with the *notable exception of `text` and `annotated_text` fields*.
12+
The `doc_values` field is an on-disk data structure that is built at document index time and enables efficient data access. It stores the same values as `_source`, but in a columnar format that is more efficient for sorting and aggregation.
13+
14+
Doc values are supported on most field types, excluding `text` and `annotated_text` fields. See also [Disabling doc values](#_disabling_doc_values).
1315

1416
## Doc-value-only fields [doc-value-only-fields]
1517

@@ -41,7 +43,15 @@ PUT my-index-000001
4143

4244
## Disabling doc values [_disabling_doc_values]
4345

44-
All fields which support doc values have them enabled by default. If you are sure that you don’t need to sort or aggregate on a field, or access the field value from a script, you can disable doc values in order to save disk space:
46+
For all fields that support them, `doc_values` are enabled by default. If you're certain you don't need to sort or aggregate on a field, or access its value from a script, you can disable `doc_values` in order to save disk space.
47+
48+
::::{note}
49+
You cannot disable doc values for [`wildcard`](/reference/elasticsearch/mapping-reference/keyword.md#wildcard-field-type) fields.
50+
51+
In some field types, such as [`search_as_you_type`](/reference/elasticsearch/mapping-reference/search-as-you-type.md), doc values appear in API responses but can't be configured. Enabling or disabling `doc_values` for these fields might result in an error or have no effect.
52+
::::
53+
54+
In the following example, `doc_values` is disabled on one field:
4555

4656
```console
4757
PUT my-index-000001
@@ -64,9 +74,7 @@ PUT my-index-000001
6474
2. The `session_id` has `doc_values` disabled, but can still be queried.
6575

6676

67-
::::{note}
68-
You cannot disable doc values for [`wildcard`](/reference/elasticsearch/mapping-reference/keyword.md#wildcard-field-type) fields.
69-
::::
77+
7078

7179

7280

libs/entitlement/bridge/src/main/java/org/elasticsearch/entitlement/bridge/EntitlementChecker.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,10 @@ public interface EntitlementChecker {
523523
javax.net.ssl.HttpsURLConnection that
524524
);
525525

526+
void check$sun_net_www_protocol_mailto_MailToURLConnection$connect(Class<?> callerClass, java.net.URLConnection that);
527+
528+
void check$sun_net_www_protocol_mailto_MailToURLConnection$getOutputStream(Class<?> callerClass, java.net.URLConnection that);
529+
526530
// Network miscellanea
527531

528532
// HttpClient#send and sendAsync are abstract, so we instrument their internal implementations

libs/entitlement/qa/entitled-plugin/src/main/java/org/elasticsearch/entitlement/qa/entitled/EntitledActions.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import java.io.IOException;
1515
import java.net.URI;
16+
import java.net.URISyntaxException;
1617
import java.net.URLConnection;
1718
import java.nio.file.Files;
1819
import java.nio.file.Path;
@@ -76,4 +77,8 @@ public static URLConnection createFileURLConnection() throws IOException {
7677
var fileUrl = createTempFileForWrite().toUri().toURL();
7778
return fileUrl.openConnection();
7879
}
80+
81+
public static URLConnection createMailToURLConnection() throws URISyntaxException, IOException {
82+
return new URI("mailto", "[email protected]", null).toURL().openConnection();
83+
}
7984
}

libs/entitlement/qa/entitlement-test-plugin/src/main/java/org/elasticsearch/entitlement/qa/test/URLConnectionNetworkActions.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,17 @@ private static void withJdkFtpConnection(CheckedConsumer<URLConnection, Exceptio
103103
}
104104
}
105105

106+
private static void withJdkMailToConnection(CheckedConsumer<URLConnection, Exception> connectionConsumer) throws Exception {
107+
var conn = EntitledActions.createMailToURLConnection();
108+
// Be sure we got the connection implementation we want
109+
assert conn.getClass().getSimpleName().equals("MailToURLConnection");
110+
try {
111+
connectionConsumer.accept(conn);
112+
} catch (IOException e) {
113+
// It's OK, it means we passed entitlement checks, and we tried to perform some IO
114+
}
115+
}
116+
106117
@EntitlementTest(expectedAccess = PLUGINS)
107118
static void urlOpenConnection() throws Exception {
108119
URI.create("http://127.0.0.1:12345/").toURL().openConnection();
@@ -429,4 +440,14 @@ static void sunHttpsURLConnectionImplGetContent() throws Exception {
429440
static void sunHttpsURLConnectionImplGetContentWithClasses() throws Exception {
430441
withJdkHttpsConnection(httpsURLConnection -> httpsURLConnection.getContent(new Class<?>[] { String.class }));
431442
}
443+
444+
@EntitlementTest(expectedAccess = PLUGINS)
445+
static void sunMailToURLConnectionConnect() throws Exception {
446+
withJdkMailToConnection(URLConnection::connect);
447+
}
448+
449+
@EntitlementTest(expectedAccess = PLUGINS)
450+
static void sunMailToURLConnectionGetOutputStream() throws Exception {
451+
withJdkMailToConnection(URLConnection::getOutputStream);
452+
}
432453
}

libs/entitlement/src/main/java/org/elasticsearch/entitlement/runtime/api/ElasticsearchEntitlementChecker.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,6 +1185,16 @@ private static boolean isFileUrlConnection(java.net.URLConnection urlConnection)
11851185
policyManager.checkOutboundNetworkAccess(callerClass);
11861186
}
11871187

1188+
@Override
1189+
public void check$sun_net_www_protocol_mailto_MailToURLConnection$connect(Class<?> callerClass, java.net.URLConnection that) {
1190+
policyManager.checkOutboundNetworkAccess(callerClass);
1191+
}
1192+
1193+
@Override
1194+
public void check$sun_net_www_protocol_mailto_MailToURLConnection$getOutputStream(Class<?> callerClass, java.net.URLConnection that) {
1195+
policyManager.checkOutboundNetworkAccess(callerClass);
1196+
}
1197+
11881198
@Override
11891199
public void check$jdk_internal_net_http_HttpClientImpl$send(
11901200
Class<?> callerClass,

0 commit comments

Comments
 (0)