Skip to content

Commit 8dd801f

Browse files
committed
Merge remote-tracking branch 'upstream/main' into security-stats-with-dls
* upstream/main: (188 commits) XContent parsing for DocStats and ShardFieldStats (elastic#135016) ESQL: Fix multi cluster tests not working with @repeat (elastic#135208) ESQL: Enable Lookup Join on Expression Tech Preview (elastic#134952) Use gradleProperty instead of findProperty (elastic#135203) Update 133980.yaml Small fixes Adjust commit sizes to reflect change in TieredMergePolicy Update 133980.yaml Update docs/changelog/133980.yaml Use released lucene 10.3.0 Update to Lucene 10.3.0 RC2 Aggs: Fix test (elastic#134308) correct docs version Use last lucene 10.3 snapshot [Automated] Update Lucene snapshot to 10.4.0-snapshot-28bd476b1a1 Update ValuesSourceReaderOperatorTests test condition for changes in lucene (elastic#133807) [Automated] Update Lucene snapshot to 10.3.0-snapshot-878a3db9c2d [Automated] Update Lucene snapshot to 10.3.0-snapshot-878a3db9c2d [Automated] Update Lucene snapshot to 10.3.0-snapshot-d664abb181a [Automated] Update Lucene snapshot to 10.3.0-snapshot-de669618c3c ...
2 parents 5d1135a + d5492e1 commit 8dd801f

File tree

106 files changed

+2402
-1436
lines changed

Some content is hidden

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

106 files changed

+2402
-1436
lines changed

benchmarks/src/main/java/org/elasticsearch/benchmark/index/codec/tsdb/TSDBDocValuesMergeBenchmark.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import org.apache.lucene.util.BytesRef;
2727
import org.elasticsearch.cluster.metadata.DataStream;
2828
import org.elasticsearch.common.logging.LogConfigurator;
29-
import org.elasticsearch.index.codec.Elasticsearch900Lucene101Codec;
29+
import org.elasticsearch.index.codec.Elasticsearch92Lucene103Codec;
3030
import org.elasticsearch.index.codec.tsdb.es819.ES819TSDBDocValuesFormat;
3131
import org.openjdk.jmh.annotations.Benchmark;
3232
import org.openjdk.jmh.annotations.BenchmarkMode;
@@ -63,7 +63,6 @@
6363
public class TSDBDocValuesMergeBenchmark {
6464

6565
static {
66-
// For Elasticsearch900Lucene101Codec:
6766
LogConfigurator.loadLog4jPlugins();
6867
LogConfigurator.configureESLogging();
6968
LogConfigurator.setNodeName("test");
@@ -259,8 +258,7 @@ private static IndexWriterConfig createIndexWriterConfig(boolean optimizedMergeE
259258
config.setLeafSorter(DataStream.TIMESERIES_LEAF_READERS_SORTER);
260259
config.setMergePolicy(new LogByteSizeMergePolicy());
261260
var docValuesFormat = new ES819TSDBDocValuesFormat(4096, 512, optimizedMergeEnabled);
262-
config.setCodec(new Elasticsearch900Lucene101Codec() {
263-
261+
config.setCodec(new Elasticsearch92Lucene103Codec() {
264262
@Override
265263
public DocValuesFormat getDocValuesFormatForField(String field) {
266264
return docValuesFormat;

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/transport/TransportVersionResourcesPlugin.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import org.gradle.api.Project;
2020
import org.gradle.api.file.Directory;
2121
import org.gradle.api.plugins.JavaPlugin;
22+
import org.gradle.api.provider.Provider;
2223
import org.gradle.api.tasks.Copy;
2324
import org.gradle.language.base.plugins.LifecycleBasePlugin;
2425

@@ -49,9 +50,9 @@ public void apply(Project project) {
4950
Directory transportResources = project.getLayout().getProjectDirectory().dir("src/main/resources/" + resourceRoot);
5051
spec.getParameters().getTransportResourcesDirectory().set(transportResources);
5152
spec.getParameters().getRootDirectory().set(project.getLayout().getSettingsDirectory().getAsFile());
52-
Object upstreamRef = project.findProperty("org.elasticsearch.transport.upstreamRef");
53-
if (upstreamRef != null) {
54-
spec.getParameters().getUpstreamRefOverride().set(upstreamRef.toString());
53+
Provider<String> upstreamRef = project.getProviders().gradleProperty("org.elasticsearch.transport.upstreamRef");
54+
if (upstreamRef.isPresent()) {
55+
spec.getParameters().getUpstreamRefOverride().set(upstreamRef.get());
5556
}
5657
});
5758

@@ -120,10 +121,7 @@ public void apply(Project project) {
120121
}
121122

122123
private static String getResourceRoot(Project project) {
123-
var resourceRoot = project.findProperty("org.elasticsearch.transport.resourceRoot");
124-
if (resourceRoot == null) {
125-
resourceRoot = "transport";
126-
}
127-
return resourceRoot.toString();
124+
Provider<String> resourceRootProperty = project.getProviders().gradleProperty("org.elasticsearch.transport.resourceRoot");
125+
return resourceRootProperty.isPresent() ? resourceRootProperty.get() : "transport";
128126
}
129127
}

build-tools-internal/version.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
elasticsearch = 9.2.0
2-
lucene = 10.2.2
2+
lucene = 10.3.0
33

44
bundled_jdk_vendor = openjdk
55
bundled_jdk = 25+36@bd75d5f9689641da8e1daabeccb5528b

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,6 @@ static List<String> systemJvmOptions(Settings nodeSettings, final Map<String, St
6060
"-Dio.netty.noUnsafe=true",
6161
"-Dio.netty.noKeySetOptimization=true",
6262
"-Dio.netty.recycler.maxCapacityPerThread=0",
63-
// temporary until we get off-heap vector stats in Lucene 10.3
64-
"--add-opens=org.apache.lucene.core/org.apache.lucene.codecs.lucene99=org.elasticsearch.server",
65-
"--add-opens=org.apache.lucene.backward_codecs/org.apache.lucene.backward_codecs.lucene90=org.elasticsearch.server",
66-
"--add-opens=org.apache.lucene.backward_codecs/org.apache.lucene.backward_codecs.lucene91=org.elasticsearch.server",
67-
"--add-opens=org.apache.lucene.backward_codecs/org.apache.lucene.backward_codecs.lucene92=org.elasticsearch.server",
68-
"--add-opens=org.apache.lucene.backward_codecs/org.apache.lucene.backward_codecs.lucene94=org.elasticsearch.server",
69-
"--add-opens=org.apache.lucene.backward_codecs/org.apache.lucene.backward_codecs.lucene95=org.elasticsearch.server",
7063
// log4j 2
7164
"-Dlog4j.shutdownHookEnabled=false",
7265
"-Dlog4j2.disable.jmx=true",

docs/Versions.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
include::{docs-root}/shared/versions/stack/{source_branch}.asciidoc[]
33

4-
:lucene_version: 10.2.2
5-
:lucene_version_path: 10_2_2
4+
:lucene_version: 10.3.0
5+
:lucene_version_path: 10_3_0
66
:jdk: 11.0.2
77
:jdk_major: 11
88
:build_type: tar

docs/changelog/133980.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
pr: 133980
2+
summary: Upgrade elasticsearch to lucene 10.3.0
3+
area: Search
4+
type: upgrade
5+
issues: []
6+
highlight:
7+
title: "New lucene 10.3.0 release"
8+
body: |-
9+
- Improved performance for lexical, vector and primary-key searches
10+
- Use optimistic-with-checking KNN Query execution strategy in place of cross-thread global queue min-score checking. Improves performance and consistency.
11+
- Bulk scoring added for floating point vectors in HNSW. Improving query latency and indexing throughput
12+
- Multiple improvements to HNSW graph traversal and storage

docs/changelog/134952.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
pr: 134952
2+
summary: Add support for expressions with LOOKUP JOIN in tech preview
3+
area: ES|QL
4+
type: enhancement
5+
issues: [ ]
6+
highlight:
7+
title: Add support for expressions with LOOKUP JOIN in tech preview
8+
body: |-
9+
Enable Lookup Join on Expression Tech Preview
10+
FROM index1 | LOOKUP JOIN lookup_index on left_field1 > right_field1 AND left_field2 <= right_field2
11+
notable: true

docs/reference/query-languages/esql/_snippets/commands/layout/lookup-join.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,22 @@ FROM <source_index>
1919
FROM <source_index>
2020
| LOOKUP JOIN <lookup_index> ON <field_name1>, <field_name2>, <field_name3>
2121
```
22+
```esql
23+
FROM <source_index>
24+
| LOOKUP JOIN <lookup_index> ON <left_field1> >= <lookup_field1> AND <left_field2> == <lookup_field2>
25+
```
2226

2327
**Parameters**
2428

2529
`<lookup_index>`
2630
: The name of the lookup index. This must be a specific index name - wildcards, aliases, and remote cluster references are not supported. Indices used for lookups must be configured with the [`lookup` index mode](/reference/elasticsearch/index-settings/index-modules.md#index-mode-setting).
2731

28-
`<field_name>` or `<field_name1>, <field_name2>, <field_name3>`
29-
: The field(s) to join on. Can be either:
30-
* A single field name
31-
* A comma-separated list of field names {applies_to}`stack: ga 9.2`
32-
: These fields must exist in both your current query results and in the lookup index. If the fields contains multi-valued entries, those entries will not match anything (the added fields will contain `null` for those rows).
32+
`<field_name>` or `<field_name1>, <field_name2>, <field_name3>` or `<left_field1> >= <lookup_field1> AND <left_field2> == <lookup_field2>`
33+
: The join condition. Can be one of the following:
34+
* A single field name
35+
* A comma-separated list of field names {applies_to}`stack: ga 9.2`
36+
* An expression with one or more join conditions linked by `AND`. Each condition compares a field from the left index with a field from the lookup index using [binary operators](/reference/query-languages/esql/functions-operators/operators.md#esql-binary-operators) (`==`, `>=`, `<=`, `>`, `<`, `!=`). Each field name in the join condition must exist in only one of the indexes. Use RENAME to resolve naming conflicts. {applies_to}`stack: preview 9.2` {applies_to}`serverless: preview`
37+
: If using join on a single field or a field list, the fields used must exist in both your current query results and in the lookup index. If the fields contains multi-valued entries, those entries will not match anything (the added fields will contain `null` for those rows).
3338

3439

3540
**Description**

docs/reference/query-languages/esql/esql-lookup-join.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,15 @@ The `LOOKUP JOIN` command adds fields from the lookup index as new columns to yo
3434

3535
The command requires two parameters:
3636
* The name of the lookup index (which must have the `lookup` [`index.mode setting`](/reference/elasticsearch/index-settings/index-modules.md#index-mode-setting))
37-
* The field(s) to join on. Can be either:
38-
* A single field name
39-
* A comma-separated list of field names {applies_to}`stack: ga 9.2`
37+
* The join condition. Can be one of the following:
38+
* A single field name
39+
* A comma-separated list of field names {applies_to}`stack: ga 9.2`
40+
* An expression with one or more join conditions linked by `AND`. Each condition compares a field from the left index with a field from the lookup index using [binary operators](/reference/query-languages/esql/functions-operators/operators.md#esql-binary-operators) (`==`, `>=`, `<=`, `>`, `<`, `!=`). Each field name in the join condition must exist in only one of the indexes. Use RENAME to resolve naming conflicts. {applies_to}`stack: preview 9.2` {applies_to}`serverless: preview`
4041

4142
```esql
4243
LOOKUP JOIN <lookup_index> ON <field_name> # Join on a single field
4344
LOOKUP JOIN <lookup_index> ON <field_name1>, <field_name2>, <field_name3> # Join on multiple fields
45+
LOOKUP JOIN <lookup_index> ON <left_field1> >= <lookup_field1> AND <left_field2> == <lookup_field2> # Join on expression
4446
```
4547

4648
:::{image} ../images/esql-lookup-join.png

0 commit comments

Comments
 (0)