Skip to content

Commit 538d250

Browse files
authored
Merge branch 'main' into feature/knn-vector-rescore-query-docs
2 parents 7b5ac90 + d3a1d9b commit 538d250

File tree

65 files changed

+1924
-947
lines changed

Some content is hidden

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

65 files changed

+1924
-947
lines changed

build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/fixtures/AbstractGitAwareGradleFuncTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ abstract class AbstractGitAwareGradleFuncTest extends AbstractGradleFuncTest {
2424

2525
def setup() {
2626
remoteGitRepo = new File(setupGitRemote(), '.git')
27-
"git clone ${remoteGitRepo.absolutePath} cloned".execute(Collections.emptyList(), testProjectDir.root).waitFor()
27+
execute("git clone ${remoteGitRepo.absolutePath} cloned", testProjectDir.root)
2828
buildFile = new File(testProjectDir.root, 'cloned/build.gradle')
2929
settingsFile = new File(testProjectDir.root, 'cloned/settings.gradle')
3030
}

distribution/tools/server-cli/src/main/java/org/elasticsearch/server/cli/SystemJvmOptions.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
import org.elasticsearch.common.settings.Settings;
1313
import org.elasticsearch.common.util.concurrent.EsExecutors;
14+
import org.elasticsearch.core.Booleans;
1415
import org.elasticsearch.core.UpdateForV9;
1516
import org.elasticsearch.jdk.RuntimeVersionFeature;
1617

@@ -26,7 +27,9 @@ final class SystemJvmOptions {
2627
static List<String> systemJvmOptions(Settings nodeSettings, final Map<String, String> sysprops) {
2728
String distroType = sysprops.get("es.distribution.type");
2829
boolean isHotspot = sysprops.getOrDefault("sun.management.compiler", "").contains("HotSpot");
29-
boolean useEntitlements = Boolean.parseBoolean(sysprops.getOrDefault("es.entitlements.enabled", "false"));
30+
boolean entitlementsExplicitlyEnabled = Booleans.parseBoolean(sysprops.getOrDefault("es.entitlements.enabled", "false"));
31+
// java 24+ only supports entitlements, but it may be enabled on earlier versions explicitly
32+
boolean useEntitlements = RuntimeVersionFeature.isSecurityManagerAvailable() == false || entitlementsExplicitlyEnabled;
3033
return Stream.of(
3134
Stream.of(
3235
/*

docs/changelog/119780.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 119780
2+
summary: Add index and reindex request settings to speed up reindex
3+
area: Data streams
4+
type: enhancement
5+
issues: []

docs/changelog/119798.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 119798
2+
summary: "Add a `PostAnalysisAware,` distribute verification"
3+
area: ES|QL
4+
type: enhancement
5+
issues: []

docs/reference/connector/docs/connectors-sharepoint-online.asciidoc

Lines changed: 63 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,10 @@ Follow these steps:
7575
* Leave the *Redirect URIs* blank for now.
7676
* *Register* the application.
7777
* Find and keep the **Application (client) ID** and **Directory (tenant) ID** handy.
78-
* Locate the **Secret** by navigating to **Client credentials: Certificates & Secrets**.
79-
* Select **New client secret**
80-
* Pick a name for your client secret.
81-
Select an expiration date. (At this expiration date, you will need to generate a new secret and update your connector configuration.)
82-
** Save the client secret **Secret ID** before leaving this screen.
83-
** Save the client secret **Value** before leaving this screen.
78+
* Create a certificate and private key. This can, for example, be done by running `openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout azure_app.key -out azure_app.crt` command. Store both in a safe and secure place
79+
* Locate the **Certificates** by navigating to **Client credentials: Certificates & Secrets**.
80+
* Select **Upload certificate**
81+
* Upload the certificate created in one of previous steps: `azure_app.crt`
8482
* Set up the permissions the OAuth App will request from the Azure Portal service account.
8583
** Navigate to **API Permissions** and click **Add Permission**.
8684
** Add **application permissions** until the list looks like the following:
@@ -114,6 +112,24 @@ When entities are not available via the Graph API the connector falls back to us
114112
[discrete#es-connectors-sharepoint-online-oauth-app-permissions]
115113
====== SharePoint permissions
116114
115+
Microsoft is https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/retirement-announcement-for-azure-acs[retiring Azure Access Control Service (ACS)]. This affects permission configuration:
116+
117+
* *Tenants created after November 1st, 2024*: Certificate authentication is required
118+
* *Tenants created before November 1st, 2024*: Secret-based authentication must be migrated to certificate authentication by April 2nd, 2026
119+
120+
[discrete#es-connectors-sharepoint-online-oauth-app-certificate-auth]
121+
===== Certificate Authentication
122+
123+
This authentication method does not require additional setup other than creating and uploading certificates to the OAuth App.
124+
125+
[discrete#es-connectors-sharepoint-online-oauth-app-secret-auth]
126+
===== Secret Authentication
127+
128+
[IMPORTANT]
129+
====
130+
This method is only applicable to tenants created before November 1st, 2024. This method will be fully retired as of April 2nd, 2026.
131+
====
132+
117133
Refer to the following documentation for setting https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azureacs[SharePoint permissions^].
118134
119135
* To set `DisableCustomAppAuthentication` to false, connect to SharePoint using PowerShell and run `set-spotenant -DisableCustomAppAuthentication $false`
@@ -219,8 +235,17 @@ The tenant name for the Azure account hosting the Sharepoint Online instance.
219235
Client ID::
220236
The client id to authenticate with SharePoint Online.
221237
238+
Authentication Method::
239+
Authentication method to use to connector to Sharepoint Online and Rest APIs. `secret` is deprecated and `certificate` is recommended.
240+
222241
Secret value::
223-
The secret value to authenticate with SharePoint Online.
242+
The secret value to authenticate with SharePoint Online, if Authentication Method: `secret` is chosen.
243+
244+
Content of certificate file::
245+
Content of certificate file if Authentication Method: `certificate` is chosen.
246+
247+
Content of private key file::
248+
Content of private key file if Authentication Method: `certificate` is chosen.
224249
225250
Comma-separated list of sites::
226251
List of site collection names or paths to fetch from SharePoint.
@@ -588,12 +613,10 @@ Follow these steps:
588613
* Leave the *Redirect URIs* blank for now.
589614
* *Register* the application.
590615
* Find and keep the **Application (client) ID** and **Directory (tenant) ID** handy.
591-
* Locate the **Secret** by navigating to **Client credentials: Certificates & Secrets**.
592-
* Select **New client secret**
593-
* Pick a name for your client secret.
594-
Select an expiration date. (At this expiration date, you will need to generate a new secret and update your connector configuration.)
595-
** Save the client secret **Secret ID** before leaving this screen.
596-
** Save the client secret **Value** before leaving this screen.
616+
* Create a certificate and private key. This can, for example, be done by running `openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout azure_app.key -out azure_app.crt` command. Store both in a safe and secure place
617+
* Locate the **Certificates** by navigating to **Client credentials: Certificates & Secrets**.
618+
* Select **Upload certificate**
619+
* Upload the certificate created in one of previous steps: `azure_app.crt`
597620
* Set up the permissions the OAuth App will request from the Azure Portal service account.
598621
** Navigate to **API Permissions** and click **Add Permission**.
599622
** Add **application permissions** until the list looks like the following:
@@ -627,6 +650,23 @@ When entities are not available via the Graph API the connector falls back to us
627650
[discrete#es-connectors-sharepoint-online-client-oauth-app-permissions]
628651
====== SharePoint permissions
629652
653+
Microsoft is https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/retirement-announcement-for-azure-acs[retiring Azure Access Control Service (ACS)]. This affects permission configuration:
654+
* *Tenants created after November 1st, 2024*: Certificate authentication is required
655+
* *Tenants created before November 1st, 2024*: Secret-based authentication must be migrated to certificate authentication by April 2nd, 2026
656+
657+
[discrete#es-connectors-sharepoint-online-client-oauth-app-certificate-auth]
658+
===== Certificate Authentication
659+
660+
This authentication method does not require additional setup other than creating and uploading certificates to the OAuth App.
661+
662+
[discrete#es-connectors-sharepoint-online-client-oauth-app-secret-auth]
663+
===== Secret Authentication
664+
665+
[IMPORTANT]
666+
====
667+
This method is only applicable to tenants created before November 1st, 2024. This method will be fully retired as of April 2nd, 2026.
668+
====
669+
630670
Refer to the following documentation for setting https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azureacs[SharePoint permissions^].
631671
632672
* To set `DisableCustomAppAuthentication` to false, connect to SharePoint using PowerShell and run `set-spotenant -DisableCustomAppAuthentication $false`
@@ -742,8 +782,17 @@ The tenant name for the Azure account hosting the Sharepoint Online instance.
742782
`client_id`::
743783
The client id to authenticate with SharePoint Online.
744784
785+
`auth_method`::
786+
Authentication method to use to connector to Sharepoint Online and Rest APIs. `secret` is deprecated and `certificate` is recommended.
787+
745788
`secret_value`::
746-
The secret value to authenticate with SharePoint Online.
789+
The secret value to authenticate with SharePoint Online, if auth_method: `secret` is chosen.
790+
791+
`certificate`::
792+
Content of certificate file if auth_method: `certificate` is chosen.
793+
794+
`private_key`::
795+
Content of private key file if auth_method: `certificate` is chosen.
747796
748797
`site_collections`::
749798
List of site collection names or paths to fetch from SharePoint.

docs/reference/query-dsl/intervals-query.asciidoc

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,22 @@ matches. Defaults to `-1`.
303303

304304
If unspecified or set to `-1`, there is no width restriction on the match. If
305305
set to `0`, the terms must appear next to each other.
306+
307+
Internal intervals can have their own `max_gaps` values. In this case
308+
we first find internal intervals with their `max_gaps` values, and then
309+
combine them to see if a gap between internal intervals match
310+
the value of `max_gaps` of the `all_of` rule.
311+
312+
For examples, how `max_gaps` works, see <<interval-max_gaps-all-rule>>.
306313
--
307314

308315
`ordered`::
309316
(Optional, Boolean) If `true`, intervals produced by the rules should appear in
310317
the order in which they are specified. Defaults to `false`.
311318

319+
If `ordered` is `false`, intervals can appear in any order,
320+
including overlapping with each other.
321+
312322
`filter`::
313323
(Optional, <<interval_filter,interval filter>> rule object) Rule used to filter
314324
returned intervals.
@@ -468,3 +478,94 @@ This query does *not* match a document containing the phrase `hot porridge is
468478
salty porridge`, because the intervals returned by the match query for `hot
469479
porridge` only cover the initial two terms in this document, and these do not
470480
overlap the intervals covering `salty`.
481+
482+
[[interval-max_gaps-all-rule]]
483+
===== max_gaps in `all_of` ordered and unordered rule
484+
485+
The following `intervals` search returns documents containing `my
486+
favorite food` without any gap, followed by `cold porridge` that
487+
can have at most 4 tokens between "cold" and "porridge". These
488+
two inner intervals when combined in the outer `all_of` interval,
489+
must have at most 1 gap between each other.
490+
491+
Because the `all_of` rule has `ordered` set to `true`, the inner
492+
intervals are expected to be in the provided order. Thus,
493+
this search would match a `my_text` value of `my favorite food is cold
494+
porridge` but not `when it's cold my favorite food is porridge`.
495+
496+
[source,console]
497+
--------------------------------------------------
498+
POST _search
499+
{
500+
"query": {
501+
"intervals" : {
502+
"my_text" : {
503+
"all_of" : {
504+
"ordered" : true, <1>
505+
"max_gaps": 1,
506+
"intervals" : [
507+
{
508+
"match" : {
509+
"query" : "my favorite food",
510+
"max_gaps" : 0,
511+
"ordered" : true
512+
}
513+
},
514+
{
515+
"match" : {
516+
"query" : "cold porridge",
517+
"max_gaps" : 4,
518+
"ordered" : true
519+
}
520+
}
521+
]
522+
}
523+
}
524+
}
525+
}
526+
}
527+
--------------------------------------------------
528+
<1> The `ordered` parameter is set to `true`, so intervals must appear in the order specified.
529+
530+
531+
Below is the same query, but with `ordered` set to `false`. This means that
532+
intervals can appear in any order, even overlap with each other.
533+
Thus, this search would match a `my_text` value of `my favorite food is cold
534+
porridge`, as well as `when it's cold my favorite food is porridge`.
535+
In `when it's cold my favorite food is porridge`, `cold .... porridge` interval
536+
overlaps with `my favorite food` interval.
537+
538+
[source,console]
539+
--------------------------------------------------
540+
POST _search
541+
{
542+
"query": {
543+
"intervals" : {
544+
"my_text" : {
545+
"all_of" : {
546+
"ordered" : false, <1>
547+
"max_gaps": 1,
548+
"intervals" : [
549+
{
550+
"match" : {
551+
"query" : "my favorite food",
552+
"max_gaps" : 0,
553+
"ordered" : true
554+
}
555+
},
556+
{
557+
"match" : {
558+
"query" : "cold porridge",
559+
"max_gaps" : 4,
560+
"ordered" : true
561+
}
562+
}
563+
]
564+
}
565+
}
566+
}
567+
}
568+
}
569+
--------------------------------------------------
570+
<1> The `ordered` parameter is set to `true`, so intervals can appear in any order,
571+
even overlap with each other.

docs/reference/rest-api/security/get-service-accounts.asciidoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,21 @@ GET /_security/service/elastic/fleet-server
276276
"view_index_metadata"
277277
],
278278
"allow_restricted_indices": false
279+
},
280+
{
281+
"names": [
282+
"agentless-*",
283+
],
284+
"privileges": [
285+
"read",
286+
"write",
287+
"monitor",
288+
"create_index",
289+
"auto_configure",
290+
"maintenance",
291+
"view_index_metadata"
292+
],
293+
"allow_restricted_indices": false
279294
}
280295
],
281296
"applications": [

docs/reference/scripting/using.asciidoc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,13 @@ when you're creating <<runtime-mapping-fields,runtime fields>>.
201201
[[script-stored-scripts]]
202202
=== Store and retrieve scripts
203203
You can store and retrieve scripts from the cluster state using the
204-
<<stored-script-apis,stored script APIs>>. Stored scripts reduce compilation
205-
time and make searches faster.
204+
<<stored-script-apis,stored script APIs>>. Stored scripts allow you to reference
205+
shared scripts for operations like scoring, aggregating, filtering, and
206+
reindexing. Instead of embedding scripts inline in each query, you can reference
207+
these shared operations.
208+
209+
Stored scripts can also reduce request payload size. Depending on script size
210+
and request frequency, this can help lower latency and data transfer costs.
206211

207212
NOTE: Unlike regular scripts, stored scripts require that you specify a script
208213
language using the `lang` parameter.

0 commit comments

Comments
 (0)