Skip to content

Commit 47e5d8e

Browse files
authored
Merge branch 'main' into ivf_hkmeans
2 parents 5743d59 + bbd65c6 commit 47e5d8e

File tree

35 files changed

+1109
-89
lines changed

35 files changed

+1109
-89
lines changed

benchmarks/src/main/java/org/elasticsearch/benchmark/search/query/range/DateFieldMapperDocValuesSkipperBenchmark.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
import org.apache.lucene.index.IndexWriterConfig;
2222
import org.apache.lucene.search.IndexOrDocValuesQuery;
2323
import org.apache.lucene.search.IndexSearcher;
24-
import org.apache.lucene.search.IndexSortSortedNumericDocValuesRangeQuery;
2524
import org.apache.lucene.search.Query;
2625
import org.apache.lucene.search.Sort;
2726
import org.apache.lucene.search.SortField;
2827
import org.apache.lucene.search.SortedNumericSortField;
2928
import org.apache.lucene.store.Directory;
3029
import org.apache.lucene.store.FSDirectory;
3130
import org.apache.lucene.util.BytesRef;
31+
import org.elasticsearch.lucene.search.XIndexSortSortedNumericDocValuesRangeQuery;
3232
import org.openjdk.jmh.annotations.Benchmark;
3333
import org.openjdk.jmh.annotations.BenchmarkMode;
3434
import org.openjdk.jmh.annotations.Fork;
@@ -295,7 +295,7 @@ public void rangeQueryWithDocValuesSkipper(final Blackhole bh) throws IOExceptio
295295
/**
296296
* Runs the actual Lucene range query, optionally combining a {@link LongPoint} index query
297297
* with doc values ({@link SortedNumericDocValuesField}) via {@link IndexOrDocValuesQuery},
298-
* and then wrapping it with an {@link IndexSortSortedNumericDocValuesRangeQuery} to utilize the index sort.
298+
* and then wrapping it with an {@link XIndexSortSortedNumericDocValuesRangeQuery} to utilize the index sort.
299299
*
300300
* @param searcher the Lucene {@link IndexSearcher}
301301
* @param rangeStartTimestamp lower bound of the timestamp range
@@ -316,7 +316,7 @@ private long rangeQuery(final IndexSearcher searcher, long rangeStartTimestamp,
316316
)
317317
: SortedNumericDocValuesField.newSlowRangeQuery(TIMESTAMP_FIELD, rangeStartTimestamp, rangeEndTimestamp);
318318

319-
final Query query = new IndexSortSortedNumericDocValuesRangeQuery(
319+
final Query query = new XIndexSortSortedNumericDocValuesRangeQuery(
320320
TIMESTAMP_FIELD,
321321
rangeStartTimestamp,
322322
rangeEndTimestamp,

build-tools-internal/src/main/resources/templates/index.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,17 @@ for(bundle in changelogBundles) {
2828
def nonNotableHighlights = bundle.nonNotableHighlights
2929
def unqualifiedVersion = bundle.unqualifiedVersion
3030
def coming = !bundle.bundle.released
31-
32-
if (coming) {
33-
print "\n"
34-
print "```{applies_to}\n"
35-
print "stack: coming ${version}\n"
36-
print "```"
37-
}
3831
%>
3932
## ${unqualifiedVersion} [elasticsearch-${versionForIds}-release-notes]
4033
<%
34+
35+
if (coming) {
36+
print "```{applies_to}\n"
37+
print "stack: coming ${version}\n"
38+
print "```"
39+
print "\n"
40+
}
41+
4142
if (!notableHighlights.isEmpty() || !nonNotableHighlights.isEmpty()) {
4243
print "\n### Highlights [elasticsearch-${versionForIds}-highlights]\n"
4344
}

build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,10 @@ tasks.named("updateDaemonJvm") {
433433
org.gradle.platform.Architecture.X86_64,
434434
org.gradle.platform.OperatingSystem.WINDOWS
435435
),
436+
BuildPlatformFactory.of(
437+
org.gradle.platform.Architecture.AARCH64,
438+
org.gradle.platform.OperatingSystem.WINDOWS
439+
),
436440
// anyone still using x86 osx?
437441
BuildPlatformFactory.of(
438442
org.gradle.platform.Architecture.X86_64,

docs/changelog/128504.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 128504
2+
summary: Add l2_norm normalization support to linear retriever
3+
area: Relevance
4+
type: enhancement
5+
issues: []

docs/changelog/128509.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 128509
2+
summary: Use default Lucene postings format when index mode is standard.
3+
area: Codec
4+
type: enhancement
5+
issues: []

docs/changelog/128740.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 128740
2+
summary: Optimize sparse vector stats collection
3+
area: Stats
4+
type: enhancement
5+
issues: []

docs/changelog/128746.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 128746
2+
summary: Fix computation of last block size in Azure concurrent multipart uploads
3+
area: Snapshot/Restore
4+
type: bug
5+
issues: []

docs/reference/elasticsearch/rest-apis/retrievers.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ Each entry specifies the following parameters:
276276
`normalizer`
277277
: (Optional, String)
278278

279-
Specifies how we will normalize the retriever’s scores, before applying the specified `weight`. Available values are: `minmax`, and `none`. Defaults to `none`.
279+
- Specifies how we will normalize the retriever’s scores, before applying the specified `weight`. Available values are: `minmax`, `l2_norm`, and `none`. Defaults to `none`.
280280

281281
* `none`
282282
* `minmax` : A `MinMaxScoreNormalizer` that normalizes scores based on the following formula
@@ -285,6 +285,7 @@ Each entry specifies the following parameters:
285285
score = (score - min) / (max - min)
286286
```
287287

288+
* `l2_norm` : An `L2ScoreNormalizer` that normalizes scores using the L2 norm of the score values.
288289

289290
See also [this hybrid search example](docs-content://solutions/search/retrievers-examples.md#retrievers-examples-linear-retriever) using a linear retriever on how to independently configure and apply normalizers to retrievers.
290291

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#This file is generated by updateDaemonJvm
2-
toolchainUrl.LINUX.AARCH64=https\://api.adoptium.net/v3/binary/version/jdk-21.0.6+7/linux/aarch64/jdk/hotspot/normal/eclipse?project\=jdk
3-
toolchainUrl.LINUX.X86_64=https\://api.adoptium.net/v3/binary/version/jdk-21.0.6+7/linux/x64/jdk/hotspot/normal/eclipse?project\=jdk
4-
toolchainUrl.MAC_OS.AARCH64=https\://api.adoptium.net/v3/binary/version/jdk-21.0.6+7/mac/aarch64/jdk/hotspot/normal/eclipse?project\=jdk
5-
toolchainUrl.MAC_OS.X86_64=https\://api.adoptium.net/v3/binary/version/jdk-21.0.6+7/mac/x64/jdk/hotspot/normal/eclipse?project\=jdk
6-
toolchainUrl.WINDOWS.X86_64=https\://api.adoptium.net/v3/binary/version/jdk-21.0.6+7/windows/x64/jdk/hotspot/normal/eclipse?project\=jdk
2+
toolchainUrl.LINUX.AARCH64=https\://api.adoptium.net/v3/binary/version/jdk-21.0.7+6/linux/aarch64/jdk/hotspot/normal/eclipse?project\=jdk
3+
toolchainUrl.LINUX.X86_64=https\://api.adoptium.net/v3/binary/version/jdk-21.0.7+6/linux/x64/jdk/hotspot/normal/eclipse?project\=jdk
4+
toolchainUrl.MAC_OS.AARCH64=https\://api.adoptium.net/v3/binary/version/jdk-21.0.7+6/mac/aarch64/jdk/hotspot/normal/eclipse?project\=jdk
5+
toolchainUrl.MAC_OS.X86_64=https\://api.adoptium.net/v3/binary/version/jdk-21.0.7+6/mac/x64/jdk/hotspot/normal/eclipse?project\=jdk
6+
toolchainUrl.WINDOWS.AARCH64=https\://api.adoptium.net/v3/binary/version/jdk-21.0.7+6/windows/aarch64/jdk/hotspot/normal/eclipse?project\=jdk
7+
toolchainUrl.WINDOWS.X86_64=https\://api.adoptium.net/v3/binary/version/jdk-21.0.7+6/windows/x64/jdk/hotspot/normal/eclipse?project\=jdk
78
toolchainVendor=ADOPTIUM
89
toolchainVersion=21

modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/ScaledFloatFieldTypeTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
import org.apache.lucene.document.Document;
1313
import org.apache.lucene.document.DoublePoint;
14-
import org.apache.lucene.document.LongField;
1514
import org.apache.lucene.document.LongPoint;
1615
import org.apache.lucene.document.SortedNumericDocValuesField;
1716
import org.apache.lucene.index.DirectoryReader;
@@ -31,6 +30,7 @@
3130
import org.elasticsearch.index.mapper.MappedFieldType;
3231
import org.elasticsearch.index.mapper.MapperBuilderContext;
3332
import org.elasticsearch.index.mapper.NumberFieldMapper;
33+
import org.elasticsearch.lucene.document.NumericField;
3434

3535
import java.io.IOException;
3636
import java.util.Arrays;
@@ -48,7 +48,7 @@ public void testTermQuery() {
4848
);
4949
double value = (randomDouble() * 2 - 1) * 10000;
5050
long scaledValue = Math.round(value * ft.getScalingFactor());
51-
assertEquals(LongField.newExactQuery("scaled_float", scaledValue), ft.termQuery(value, MOCK_CONTEXT));
51+
assertEquals(NumericField.newExactLongQuery("scaled_float", scaledValue), ft.termQuery(value, MOCK_CONTEXT));
5252

5353
MappedFieldType ft2 = new ScaledFloatFieldMapper.ScaledFloatFieldType("scaled_float", 0.1 + randomDouble() * 100, false);
5454
ElasticsearchException e2 = expectThrows(ElasticsearchException.class, () -> ft2.termQuery("42", MOCK_CONTEXT_DISALLOW_EXPENSIVE));

0 commit comments

Comments
 (0)