Skip to content

Commit 6492cd7

Browse files
Merge branch 'main' of github.com:elastic/elasticsearch into custom-inference-service
2 parents 4242a37 + dbfaf30 commit 6492cd7

File tree

240 files changed

+12586
-2210
lines changed

Some content is hidden

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

240 files changed

+12586
-2210
lines changed

.buildkite/scripts/third-party-test-credentials.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ set -euo pipefail
77
# The second/lowercase export is what the tests expect/require
88

99
if [[ "${USE_3RD_PARTY_AZURE_CREDENTIALS:-}" == "true" ]]; then
10+
# These credentials expire periodically and must be manually renewed - the process is in the onboarding/process docs.
1011
json=$(vault read -format=json secret/ci/elastic-elasticsearch/migrated/azure_thirdparty_test_creds)
1112

1213
AZURE_STORAGE_ACCOUNT_SECRET=$(echo "$json" | jq -r .data.account_id)
@@ -19,6 +20,7 @@ if [[ "${USE_3RD_PARTY_AZURE_CREDENTIALS:-}" == "true" ]]; then
1920
fi
2021

2122
if [[ "${USE_3RD_PARTY_AZURE_SAS_CREDENTIALS:-}" == "true" ]]; then
23+
# These credentials expire periodically and must be manually renewed - the process is in the onboarding/process docs.
2224
json=$(vault read -format=json secret/ci/elastic-elasticsearch/migrated/azure_thirdparty_sas_test_creds)
2325

2426
AZURE_STORAGE_ACCOUNT_SECRET=$(echo "$json" | jq -r .data.account_id)

benchmarks/src/main/java/org/elasticsearch/benchmark/compute/operator/ValuesAggregatorBenchmark.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@
2121
import org.elasticsearch.compute.data.Block;
2222
import org.elasticsearch.compute.data.BlockFactory;
2323
import org.elasticsearch.compute.data.BytesRefBlock;
24+
import org.elasticsearch.compute.data.BytesRefVector;
2425
import org.elasticsearch.compute.data.ElementType;
2526
import org.elasticsearch.compute.data.IntBlock;
27+
import org.elasticsearch.compute.data.IntVector;
2628
import org.elasticsearch.compute.data.LongBlock;
2729
import org.elasticsearch.compute.data.LongVector;
30+
import org.elasticsearch.compute.data.OrdinalBytesRefVector;
2831
import org.elasticsearch.compute.data.Page;
2932
import org.elasticsearch.compute.operator.AggregationOperator;
3033
import org.elasticsearch.compute.operator.DriverContext;
@@ -282,11 +285,18 @@ private static Block dataBlock(int groups, String dataType) {
282285
int blockLength = blockLength(groups);
283286
return switch (dataType) {
284287
case BYTES_REF -> {
285-
try (BytesRefBlock.Builder builder = blockFactory.newBytesRefBlockBuilder(blockLength)) {
288+
try (
289+
BytesRefVector.Builder dict = blockFactory.newBytesRefVectorBuilder(blockLength);
290+
IntVector.Builder ords = blockFactory.newIntVectorBuilder(blockLength)
291+
) {
292+
final int dictLength = Math.min(blockLength, KEYWORDS.length);
293+
for (int i = 0; i < dictLength; i++) {
294+
dict.appendBytesRef(KEYWORDS[i]);
295+
}
286296
for (int i = 0; i < blockLength; i++) {
287-
builder.appendBytesRef(KEYWORDS[i % KEYWORDS.length]);
297+
ords.appendInt(i % dictLength);
288298
}
289-
yield builder.build();
299+
yield new OrdinalBytesRefVector(ords.build(), dict.build()).asBlock();
290300
}
291301
}
292302
case INT -> {

benchmarks/src/main/java/org/elasticsearch/benchmark/vector/OSQScorerBenchmark.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import org.apache.lucene.util.VectorUtil;
1818
import org.apache.lucene.util.quantization.OptimizedScalarQuantizer;
1919
import org.elasticsearch.common.logging.LogConfigurator;
20-
import org.elasticsearch.simdvec.internal.vectorization.ES91OSQVectorsScorer;
20+
import org.elasticsearch.simdvec.ES91OSQVectorsScorer;
2121
import org.elasticsearch.simdvec.internal.vectorization.ESVectorizationProvider;
2222
import org.openjdk.jmh.annotations.Benchmark;
2323
import org.openjdk.jmh.annotations.BenchmarkMode;

docs/changelog/127355.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 127355
2+
summary: '`text ==` and `text !=` pushdown'
3+
area: ES|QL
4+
type: enhancement
5+
issues: []

docs/changelog/127629.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 127629
2+
summary: ES|QL SAMPLE aggregation function
3+
area: Machine Learning
4+
type: feature
5+
issues: []

docs/changelog/127752.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 127752
2+
summary: Downsampling does not consider passthrough fields as dimensions
3+
area: Downsampling
4+
type: bug
5+
issues:
6+
- 125156

docs/changelog/127817.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 127817
2+
summary: Replace auto-read with proper flow-control in HTTP pipeline
3+
area: Network
4+
type: enhancement
5+
issues: []

docs/changelog/127824.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 127824
2+
summary: Skip the validation when retrieving the index mode during reindexing a time
3+
series data stream
4+
area: TSDB
5+
type: bug
6+
issues: []

docs/changelog/127849.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 127849
2+
summary: Optimize ordinal inputs in Values aggregation
3+
area: "ES|QL"
4+
type: enhancement
5+
issues: []

docs/changelog/127856.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 127856
2+
summary: Fix services API Google Vertex AI Rerank location field requirement
3+
area: Machine Learning
4+
type: bug
5+
issues: []

docs/reference/elasticsearch/mapping-reference/keyword.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,42 @@ Will become:
232232
}
233233
```
234234

235+
If `null_value` is configured, `null` values are replaced with the `null_value` in synthetic source:
236+
237+
$$$synthetic-source-keyword-example-null-value$$$
238+
239+
```console
240+
PUT idx
241+
{
242+
"settings": {
243+
"index": {
244+
"mapping": {
245+
"source": {
246+
"mode": "synthetic"
247+
}
248+
}
249+
}
250+
},
251+
"mappings": {
252+
"properties": {
253+
"kwd": { "type": "keyword", "null_value": "NA" }
254+
}
255+
}
256+
}
257+
PUT idx/_doc/1
258+
{
259+
"kwd": ["foo", null, "bar"]
260+
}
261+
```
262+
263+
Will become:
264+
265+
```console-result
266+
{
267+
"kwd": ["NA", "bar", "foo"]
268+
}
269+
```
270+
235271

236272
## Constant keyword field type [constant-keyword-field-type]
237273

docs/reference/elasticsearch/mapping-reference/text.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,17 @@ Synthetic `_source` is Generally Available only for TSDB indices (indices that h
104104
::::
105105

106106

107-
`text` fields support [synthetic `_source`](/reference/elasticsearch/mapping-reference/mapping-source-field.md#synthetic-source) if they have a [`keyword`](/reference/elasticsearch/mapping-reference/keyword.md#keyword-synthetic-source) sub-field that supports synthetic `_source` or if the `text` field sets `store` to `true`. Either way, it may not have [`copy_to`](/reference/elasticsearch/mapping-reference/copy-to.md).
107+
`text` fields can use a [`keyword`](/reference/elasticsearch/mapping-reference/keyword.md#keyword-synthetic-source) sub-field to support [synthetic `_source`](/reference/elasticsearch/mapping-reference/mapping-source-field.md#synthetic-source) without storing values of the text field itself.
108108

109-
If using a sub-`keyword` field, then the values are sorted in the same way as a `keyword` field’s values are sorted. By default, that means sorted with duplicates removed. So:
109+
In this case, the synthetic source of the `text` field will have the same [modifications](/reference/elasticsearch/mapping-reference/mapping-source-field.md#synthetic-source) as a `keyword` field.
110110

111-
$$$synthetic-source-text-example-default$$$
111+
These modifications can impact usage of `text` fields:
112+
* Reordering text fields can have an effect on [phrase](/reference/query-languages/query-dsl/query-dsl-match-query-phrase.md) and [span](/reference/query-languages/query-dsl/span-queries.md) queries. See the discussion about [`position_increment_gap`](/reference/elasticsearch/mapping-reference/position-increment-gap.md) for more details. You can avoid this by making sure the `slop` parameter on the phrase queries is lower than the `position_increment_gap`. This is the default.
113+
* Handling of `null` values is different. `text` fields ignore `null` values, but `keyword` fields support replacing `null` values with a value specified in the `null_value` parameter. This replacement is represented in synthetic source.
114+
115+
For example:
116+
117+
$$$synthetic-source-text-example-multi-field$$$
112118

113119
```console
114120
PUT idx
@@ -127,8 +133,9 @@ PUT idx
127133
"text": {
128134
"type": "text",
129135
"fields": {
130-
"raw": {
131-
"type": "keyword"
136+
"kwd": {
137+
"type": "keyword",
138+
"null_value": "NA"
132139
}
133140
}
134141
}
@@ -138,6 +145,7 @@ PUT idx
138145
PUT idx/_doc/1
139146
{
140147
"text": [
148+
null,
141149
"the quick brown fox",
142150
"the quick brown fox",
143151
"jumped over the lazy dog"
@@ -150,18 +158,15 @@ Will become:
150158
```console-result
151159
{
152160
"text": [
161+
"NA",
153162
"jumped over the lazy dog",
154163
"the quick brown fox"
155164
]
156165
}
157166
```
158167

159-
::::{note}
160-
Reordering text fields can have an effect on [phrase](/reference/query-languages/query-dsl/query-dsl-match-query-phrase.md) and [span](/reference/query-languages/query-dsl/span-queries.md) queries. See the discussion about [`position_increment_gap`](/reference/elasticsearch/mapping-reference/position-increment-gap.md) for more detail. You can avoid this by making sure the `slop` parameter on the phrase queries is lower than the `position_increment_gap`. This is the default.
161-
::::
162168

163-
164-
If the `text` field sets `store` to true then order and duplicates are preserved.
169+
If the `text` field sets `store` to `true` then the sub-field is not used and no modifications are applied. For example:
165170

166171
$$$synthetic-source-text-example-stored$$$
167172

@@ -179,7 +184,15 @@ PUT idx
179184
},
180185
"mappings": {
181186
"properties": {
182-
"text": { "type": "text", "store": true }
187+
"text": {
188+
"type": "text",
189+
"store": true,
190+
"fields": {
191+
"raw": {
192+
"type": "keyword"
193+
}
194+
}
195+
}
183196
}
184197
}
185198
}

docs/reference/query-languages/esql/_snippets/functions/description/sample.md

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/examples/sample.md

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/layout/sample.md

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/parameters/sample.md

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/types/sample.md

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/images/functions/sample.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/reference/query-languages/esql/kibana/definition/commands/change_point.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/definition/commands/dissect.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/definition/commands/drop.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/definition/commands/enrich.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/definition/commands/eval.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/definition/commands/explain.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/definition/commands/fork.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/definition/commands/grok.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/definition/commands/inlinestats.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/definition/commands/insist.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/definition/commands/keep.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/definition/commands/limit.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/definition/commands/lookup.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/definition/commands/lookup_join.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/definition/commands/mv_expand.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)