Skip to content

Commit 07576e6

Browse files
committed
Merge remote-tracking branch 'origin/main' into add-projects-delta-to-cluster-changed-event
2 parents ad8c61b + 8a17a5e commit 07576e6

File tree

143 files changed

+1718
-5209
lines changed

Some content is hidden

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

143 files changed

+1718
-5209
lines changed

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.ES91OSQVectorsScorer;
20+
import org.elasticsearch.simdvec.internal.vectorization.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/125479.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 125479
2+
summary: ES|QL - Allow full text functions to be used in STATS
3+
area: ES|QL
4+
type: enhancement
5+
issues:
6+
- 125481

docs/changelog/127796.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 127796
2+
summary: Do not respect synthetic_source_keep=arrays if type parses arrays
3+
area: Mapping
4+
type: enhancement
5+
issues:
6+
- 126155

docs/changelog/127921.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 127921
2+
summary: "[9.x] Revert \"Enable madvise by default for all builds\""
3+
area: Vector Search
4+
type: bug
5+
issues: []

docs/changelog/127949.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 127949
2+
summary: Ensure ordinal builder emit ordinal blocks
3+
area: ES|QL
4+
type: bug
5+
issues: []

docs/changelog/127975.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 127975
2+
summary: Fix a bug in `significant_terms`
3+
area: Aggregations
4+
type: bug
5+
issues: []

docs/reference/elasticsearch/mapping-reference/geo-point.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,9 @@ of official GA features.
218218

219219

220220
Synthetic source may sort `geo_point` fields (first by latitude and then
221-
longitude) and reduces them to their stored precision. For example:
221+
longitude) and reduces them to their stored precision. Additionally, unlike most
222+
types, arrays of `geo_point` fields will not preserve order if
223+
`synthetic_source_keep` is set to `arrays`. For example:
222224

223225
$$$synthetic-source-geo-point-example$$$
224226

@@ -236,15 +238,18 @@ PUT idx
236238
},
237239
"mappings": {
238240
"properties": {
239-
"point": { "type": "geo_point" }
241+
"point": {
242+
"type": "geo_point",
243+
"synthetic_source_keep": "arrays"
244+
}
240245
}
241246
}
242247
}
243248
PUT idx/_doc/1
244249
{
245250
"point": [
246-
{"lat":-90, "lon":-80},
247-
{"lat":10, "lon":30}
251+
{"lat":10, "lon":30},
252+
{"lat":-90, "lon":-80}
248253
]
249254
}
250255
```

libs/simdvec/src/main/java/org/elasticsearch/simdvec/ESVectorUtil.java

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@
99

1010
package org.elasticsearch.simdvec;
1111

12-
import org.apache.lucene.store.IndexInput;
1312
import org.apache.lucene.util.BitUtil;
1413
import org.apache.lucene.util.Constants;
1514
import org.elasticsearch.simdvec.internal.vectorization.ESVectorUtilSupport;
1615
import org.elasticsearch.simdvec.internal.vectorization.ESVectorizationProvider;
1716

18-
import java.io.IOException;
1917
import java.lang.invoke.MethodHandle;
2018
import java.lang.invoke.MethodHandles;
2119
import java.lang.invoke.MethodType;
@@ -43,10 +41,6 @@ public class ESVectorUtil {
4341

4442
private static final ESVectorUtilSupport IMPL = ESVectorizationProvider.getInstance().getVectorUtilSupport();
4543

46-
public static ES91OSQVectorsScorer getES91OSQVectorsScorer(IndexInput input, int dimension) throws IOException {
47-
return ESVectorizationProvider.getInstance().newES91OSQVectorsScorer(input, dimension);
48-
}
49-
5044
public static long ipByteBinByte(byte[] q, byte[] d) {
5145
if (q.length != d.length * B_QUERY) {
5246
throw new IllegalArgumentException("vector dimensions incompatible: " + q.length + "!= " + B_QUERY + " x " + d.length);
@@ -217,40 +211,4 @@ public static void centerAndCalculateOSQStatsDp(float[] target, float[] centroid
217211
assert stats.length == 6;
218212
IMPL.centerAndCalculateOSQStatsDp(target, centroid, centered, stats);
219213
}
220-
221-
/**
222-
* Calculates the difference between two vectors and stores the result in a third vector.
223-
* @param v1 the first vector
224-
* @param v2 the second vector
225-
* @param result the result vector, must be the same length as the input vectors
226-
*/
227-
public static void subtract(float[] v1, float[] v2, float[] result) {
228-
if (v1.length != v2.length) {
229-
throw new IllegalArgumentException("vector dimensions differ: " + v1.length + "!=" + v2.length);
230-
}
231-
if (result.length != v1.length) {
232-
throw new IllegalArgumentException("vector dimensions differ: " + result.length + "!=" + v1.length);
233-
}
234-
for (int i = 0; i < v1.length; i++) {
235-
result[i] = v1[i] - v2[i];
236-
}
237-
}
238-
239-
/**
240-
* calculates the spill-over score for a vector and a centroid, given its residual with
241-
* its actually nearest centroid
242-
* @param v1 the vector
243-
* @param centroid the centroid
244-
* @param originalResidual the residual with the actually nearest centroid
245-
* @return the spill-over score (soar)
246-
*/
247-
public static float soarResidual(float[] v1, float[] centroid, float[] originalResidual) {
248-
if (v1.length != centroid.length) {
249-
throw new IllegalArgumentException("vector dimensions differ: " + v1.length + "!=" + centroid.length);
250-
}
251-
if (originalResidual.length != v1.length) {
252-
throw new IllegalArgumentException("vector dimensions differ: " + originalResidual.length + "!=" + v1.length);
253-
}
254-
return IMPL.soarResidual(v1, centroid, originalResidual);
255-
}
256214
}

libs/simdvec/src/main/java/org/elasticsearch/simdvec/internal/vectorization/DefaultESVectorUtilSupport.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -138,18 +138,6 @@ public void centerAndCalculateOSQStatsDp(float[] target, float[] centroid, float
138138
stats[5] = centroidDot;
139139
}
140140

141-
@Override
142-
public float soarResidual(float[] v1, float[] centroid, float[] originalResidual) {
143-
assert v1.length == centroid.length;
144-
assert v1.length == originalResidual.length;
145-
float proj = 0;
146-
for (int i = 0; i < v1.length; i++) {
147-
float djk = v1[i] - centroid[i];
148-
proj = fma(djk, originalResidual[i], proj);
149-
}
150-
return proj;
151-
}
152-
153141
public static int ipByteBitImpl(byte[] q, byte[] d) {
154142
return ipByteBitImpl(q, d, 0);
155143
}

libs/simdvec/src/main/java/org/elasticsearch/simdvec/internal/vectorization/DefaultESVectorizationProvider.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
package org.elasticsearch.simdvec.internal.vectorization;
1111

1212
import org.apache.lucene.store.IndexInput;
13-
import org.elasticsearch.simdvec.ES91OSQVectorsScorer;
1413

1514
import java.io.IOException;
1615

0 commit comments

Comments
 (0)