Skip to content

Commit 769bdcd

Browse files
authored
Merge branch 'main' into lucene_snapshot_10_1
2 parents 0dea029 + 560ecf0 commit 769bdcd

File tree

98 files changed

+3321
-778
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

+3321
-778
lines changed

benchmarks/src/main/java/org/elasticsearch/benchmark/search/aggregations/TermsReduceBenchmark.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public void setup() {
111111
dict[i] = new BytesRef(Long.toString(rand.nextLong()));
112112
}
113113
for (int i = 0; i < numShards; i++) {
114-
aggsList.add(InternalAggregations.from(Collections.singletonList(newTerms(rand, dict, true))));
114+
aggsList.add(InternalAggregations.from(newTerms(rand, dict, true)));
115115
}
116116
}
117117

@@ -124,7 +124,7 @@ private StringTerms newTerms(Random rand, BytesRef[] dict, boolean withNested) {
124124
for (BytesRef term : randomTerms) {
125125
InternalAggregations subAggs;
126126
if (withNested) {
127-
subAggs = InternalAggregations.from(Collections.singletonList(newTerms(rand, dict, false)));
127+
subAggs = InternalAggregations.from(newTerms(rand, dict, false));
128128
} else {
129129
subAggs = InternalAggregations.EMPTY;
130130
}

benchmarks/src/main/java/org/elasticsearch/benchmark/search/aggregations/bucket/terms/StringTermsSerializationBenchmark.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ public class StringTermsSerializationBenchmark {
5050

5151
@Setup
5252
public void initResults() {
53-
results = DelayableWriteable.referencing(InternalAggregations.from(List.of(newTerms(true))));
53+
results = DelayableWriteable.referencing(InternalAggregations.from(newTerms(true)));
5454
}
5555

5656
private StringTerms newTerms(boolean withNested) {
5757
List<StringTerms.Bucket> resultBuckets = new ArrayList<>(buckets);
5858
for (int i = 0; i < buckets; i++) {
59-
InternalAggregations inner = withNested ? InternalAggregations.from(List.of(newTerms(false))) : InternalAggregations.EMPTY;
59+
InternalAggregations inner = withNested ? InternalAggregations.from(newTerms(false)) : InternalAggregations.EMPTY;
6060
resultBuckets.add(new StringTerms.Bucket(new BytesRef("test" + i), i, inner, false, 0, DocValueFormat.RAW));
6161
}
6262
return new StringTerms(

docs/changelog/119968.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 119968
2+
summary: Reset relocation/allocation failure counter on node join/shutdown
3+
area: Allocation
4+
type: enhancement
5+
issues: []

docs/changelog/120483.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 120483
2+
summary: Fix NPE on disabled API auth key cache
3+
area: Authentication
4+
type: bug
5+
issues: []

docs/changelog/120505.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 120505
2+
summary: "introduce new categories for deprecated resources in deprecation API"
3+
area: Indices APIs
4+
type: enhancement
5+
issues: []

docs/changelog/120642.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 120642
2+
summary: Defer unpromotable shard refreshes until index refresh blocks are cleared
3+
area: Engine
4+
type: enhancement
5+
issues: []

docs/changelog/120883.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 120883
2+
summary: Add `?master_timeout` to `POST /_ilm/migrate_to_data_tiers`
3+
area: Indices APIs
4+
type: bug
5+
issues: []

docs/reference/aggregations/metrics/scripted-metric-aggregation.asciidoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ A metric aggregation that executes using scripts to provide a metric output.
99
WARNING: `scripted_metric` is not available in {serverless-full}.
1010

1111
WARNING: Using scripts can result in slower search speeds. See
12-
<<scripts-and-search-speed>>.
12+
<<scripts-and-search-speed>>. When using a scripted metric aggregation, its intermediate state is serialized
13+
into an in-memory byte array for transmission to other nodes during the aggregation process.
14+
Consequently, a complex scripted metric aggregation may also encounter the 2GB limitation imposed on Java arrays.
1315

1416
Example:
1517

docs/reference/connector/docs/connectors-box.asciidoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Save the refresh token from the response. You'll need this for the connector con
105105
* "Write all files and folders stored in Box" in Application Scopes
106106
* "Make API calls using the as-user header" in Advanced Features
107107
3. Select `App + Enterprise Access` in App Access Level.
108-
4. Authorize your application from the admin console.
108+
4. Authorize your application from the admin console. If you do not have permission, you may need to submit the application for authorization.
109109
Save the *Client Credentials* and *Enterprise ID*. You'll need these to configure the connector.
110110
111111
[discrete#es-connectors-box-configuration]
@@ -121,7 +121,7 @@ The Client ID to authenticate with Box instance.
121121
The Client Secret to authenticate with Box instance.
122122
123123
`Refresh Token` (required if Box Account is Box Free)::
124-
The Refresh Token to generate Access Token.
124+
The Refresh Token to generate Access Token.
125125
*NOTE:* If the process terminates, you'll need to generate a new refresh token.
126126
127127
`Enterprise ID` (required if Box Account is Box Enterprise)::
@@ -179,7 +179,7 @@ See <<es-connectors-troubleshooting>>.
179179
180180
See <<es-connectors-security>>.
181181
182-
// Closing the collapsible section
182+
// Closing the collapsible section
183183
===============
184184

185185

@@ -275,7 +275,7 @@ Save the refresh token from the response. You'll need this for the connector con
275275
* "Write all files and folders stored in Box" in Application Scopes
276276
* "Make API calls using the as-user header" in Advanced Features
277277
3. Select `App + Enterprise Access` in App Access Level.
278-
4. Authorize your application from the admin console.
278+
4. Authorize your application from the admin console. If you do not have permission, you may need to submit the application for authorization.
279279
Save the *Client Credentials* and *Enterprise ID*. You'll need these to configure the connector.
280280
281281
[discrete#es-connectors-box-client-configuration]
@@ -291,7 +291,7 @@ The Client ID to authenticate with Box instance.
291291
The Client Secret to authenticate with Box instance.
292292
293293
`Refresh Token` (required if Box Account is Box Free)::
294-
The Refresh Token to generate Access Token.
294+
The Refresh Token to generate Access Token.
295295
*NOTE:* If the process terminates, you'll need to generate a new refresh token.
296296
297297
`Enterprise ID` (required if Box Account is Box Enterprise)::
@@ -375,5 +375,5 @@ See <<es-connectors-troubleshooting>>.
375375
See <<es-connectors-security>>.
376376
377377
378-
// Closing the collapsible section
378+
// Closing the collapsible section
379379
===============
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
[[infer-service-elastic]]
2+
=== Elastic {infer-cap} Service (EIS)
3+
4+
.New API reference
5+
[sidebar]
6+
--
7+
For the most up-to-date API details, refer to {api-es}/group/endpoint-inference[{infer-cap} APIs].
8+
--
9+
10+
Creates an {infer} endpoint to perform an {infer} task with the `elastic` service.
11+
12+
13+
[discrete]
14+
[[infer-service-elastic-api-request]]
15+
==== {api-request-title}
16+
17+
18+
`PUT /_inference/<task_type>/<inference_id>`
19+
20+
[discrete]
21+
[[infer-service-elastic-api-path-params]]
22+
==== {api-path-parms-title}
23+
24+
25+
`<inference_id>`::
26+
(Required, string)
27+
include::inference-shared.asciidoc[tag=inference-id]
28+
29+
`<task_type>`::
30+
(Required, string)
31+
include::inference-shared.asciidoc[tag=task-type]
32+
+
33+
--
34+
Available task types:
35+
36+
* `chat_completion`,
37+
* `sparse_embedding`.
38+
--
39+
40+
[NOTE]
41+
====
42+
The `chat_completion` task type only supports streaming and only through the `_unified` API.
43+
44+
include::inference-shared.asciidoc[tag=chat-completion-docs]
45+
====
46+
47+
[discrete]
48+
[[infer-service-elastic-api-request-body]]
49+
==== {api-request-body-title}
50+
51+
52+
`max_chunking_size`:::
53+
(Optional, integer)
54+
include::inference-shared.asciidoc[tag=chunking-settings-max-chunking-size]
55+
56+
`overlap`:::
57+
(Optional, integer)
58+
include::inference-shared.asciidoc[tag=chunking-settings-overlap]
59+
60+
`sentence_overlap`:::
61+
(Optional, integer)
62+
include::inference-shared.asciidoc[tag=chunking-settings-sentence-overlap]
63+
64+
`strategy`:::
65+
(Optional, string)
66+
include::inference-shared.asciidoc[tag=chunking-settings-strategy]
67+
68+
`service`::
69+
(Required, string)
70+
The type of service supported for the specified task type. In this case,
71+
`elastic`.
72+
73+
`service_settings`::
74+
(Required, object)
75+
include::inference-shared.asciidoc[tag=service-settings]
76+
77+
`model_id`:::
78+
(Required, string)
79+
The name of the model to use for the {infer} task.
80+
81+
`rate_limit`:::
82+
(Optional, object)
83+
By default, the `elastic` service sets the number of requests allowed per minute to `1000` in case of `sparse_embedding` and `240` in case of `chat_completion`.
84+
This helps to minimize the number of rate limit errors returned.
85+
To modify this, set the `requests_per_minute` setting of this object in your service settings:
86+
+
87+
--
88+
include::inference-shared.asciidoc[tag=request-per-minute-example]
89+
--
90+
91+
92+
[discrete]
93+
[[inference-example-elastic]]
94+
==== Elastic {infer-cap} Service example
95+
96+
97+
The following example shows how to create an {infer} endpoint called `elser-model-eis` to perform a `text_embedding` task type.
98+
99+
[source,console]
100+
------------------------------------------------------------
101+
PUT _inference/sparse_embedding/elser-model-eis
102+
{
103+
"service": "elastic",
104+
"service_settings": {
105+
"model_name": "elser"
106+
}
107+
}
108+
109+
------------------------------------------------------------
110+
// TEST[skip:TBD]
111+
112+
The following example shows how to create an {infer} endpoint called `chat-completion-endpoint` to perform a `chat_completion` task type.
113+
114+
[source,console]
115+
------------------------------------------------------------
116+
PUT /_inference/chat_completion/chat-completion-endpoint
117+
{
118+
"service": "elastic",
119+
"service_settings": {
120+
"model_id": "model-1"
121+
}
122+
}
123+
------------------------------------------------------------
124+
// TEST[skip:TBD]

0 commit comments

Comments
 (0)