Skip to content

Commit 0ee0940

Browse files
committed
Merge branch 'main' into lucene_snapshot
2 parents cd46af1 + 4990276 commit 0ee0940

File tree

78 files changed

+2524
-1486
lines changed

Some content is hidden

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

78 files changed

+2524
-1486
lines changed

docs/changelog/112933.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 112933
2+
summary: "Allow incubating Panama Vector in simdvec, and add vectorized `ipByteBin`"
3+
area: Search
4+
type: enhancement
5+
issues: []

docs/changelog/113251.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 113251
2+
summary: Span term query to convert to match no docs when unmapped field is targeted
3+
area: Search
4+
type: bug
5+
issues: []

docs/changelog/114177.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 114177
2+
summary: "Make `randomInstantBetween` always return value in range [minInstant, `maxInstant]`"
3+
area: Infra/Metrics
4+
type: bug
5+
issues: []

docs/reference/connector/apis/create-connector-api.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ PUT _connector/my-connector
116116
"name": "My Connector",
117117
"description": "My Connector to sync data to Elastic index from Google Drive",
118118
"service_type": "google_drive",
119-
"language": "english"
119+
"language": "en"
120120
}
121121
----
122122

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

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,22 @@ To connect to Zoom you need to https://developers.zoom.us/docs/internal-apps/s2s
6363
6. Click on the "Create" button to create the app registration.
6464
7. After the registration is complete, you will be redirected to the app's overview page. Take note of the "App Credentials" value, as you'll need it later.
6565
8. Navigate to the "Scopes" section and click on the "Add Scopes" button.
66-
9. The following scopes need to be added to the app.
66+
9. The following granular scopes need to be added to the app.
6767
+
6868
[source,bash]
6969
----
70-
user:read:admin
71-
meeting:read:admin
72-
chat_channel:read:admin
73-
recording:read:admin
74-
chat_message:read:admin
75-
report:read:admin
70+
user:read:list_users:admin
71+
meeting:read:list_meetings:admin
72+
meeting:read:list_past_participants:admin
73+
cloud_recording:read:list_user_recordings:admin
74+
team_chat:read:list_user_channels:admin
75+
team_chat:read:list_user_messages:admin
7676
----
77-
77+
[NOTE]
78+
====
79+
The connector requires a minimum scope of `user:read:list_users:admin` to ingest data into Elasticsearch.
80+
====
81+
+
7882
10. Click on the "Done" button to add the selected scopes to your app.
7983
11. Navigate to the "Activation" section and input the necessary information to activate the app.
8084
@@ -220,18 +224,22 @@ To connect to Zoom you need to https://developers.zoom.us/docs/internal-apps/s2s
220224
6. Click on the "Create" button to create the app registration.
221225
7. After the registration is complete, you will be redirected to the app's overview page. Take note of the "App Credentials" value, as you'll need it later.
222226
8. Navigate to the "Scopes" section and click on the "Add Scopes" button.
223-
9. The following scopes need to be added to the app.
227+
9. The following granular scopes need to be added to the app.
224228
+
225229
[source,bash]
226230
----
227-
user:read:admin
228-
meeting:read:admin
229-
chat_channel:read:admin
230-
recording:read:admin
231-
chat_message:read:admin
232-
report:read:admin
231+
user:read:list_users:admin
232+
meeting:read:list_meetings:admin
233+
meeting:read:list_past_participants:admin
234+
cloud_recording:read:list_user_recordings:admin
235+
team_chat:read:list_user_channels:admin
236+
team_chat:read:list_user_messages:admin
233237
----
234-
238+
[NOTE]
239+
====
240+
The connector requires a minimum scope of `user:read:list_users:admin` to ingest data into Elasticsearch.
241+
====
242+
+
235243
10. Click on the "Done" button to add the selected scopes to your app.
236244
11. Navigate to the "Activation" section and input the necessary information to activate the app.
237245

docs/reference/mapping/runtime.asciidoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -821,8 +821,6 @@ address.
821821
[[lookup-runtime-fields]]
822822
==== Retrieve fields from related indices
823823

824-
experimental[]
825-
826824
The <<search-fields,`fields`>> parameter on the `_search` API can also be used to retrieve fields from
827825
the related indices via runtime fields with a type of `lookup`.
828826

libs/simdvec/build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,20 @@ dependencies {
2323
}
2424
}
2525

26+
// compileMain21Java does not exist within idea (see MrJarPlugin) so we cannot reference directly by name
27+
tasks.matching { it.name == "compileMain21Java" }.configureEach {
28+
options.compilerArgs << '--add-modules=jdk.incubator.vector'
29+
// we remove Werror, since incubating suppression (-Xlint:-incubating)
30+
// is only support since JDK 22
31+
options.compilerArgs -= '-Werror'
32+
}
33+
34+
tasks.named('test').configure {
35+
if (JavaVersion.current().majorVersion.toInteger() >= 21) {
36+
jvmArgs '--add-modules=jdk.incubator.vector'
37+
}
38+
}
39+
2640
tasks.withType(CheckForbiddenApisTask).configureEach {
2741
replaceSignatureFiles 'jdk-signatures'
2842
}

libs/simdvec/src/main/java/module-info.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
module org.elasticsearch.simdvec {
1111
requires org.elasticsearch.nativeaccess;
1212
requires org.apache.lucene.core;
13+
requires org.elasticsearch.logging;
1314

1415
exports org.elasticsearch.simdvec to org.elasticsearch.server;
1516
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the "Elastic License
4+
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
5+
* Public License v 1"; you may not use this file except in compliance with, at
6+
* your election, the "Elastic License 2.0", the "GNU Affero General Public
7+
* License v3.0 only", or the "Server Side Public License, v 1".
8+
*/
9+
10+
package org.elasticsearch.simdvec;
11+
12+
import org.elasticsearch.simdvec.internal.vectorization.ESVectorUtilSupport;
13+
import org.elasticsearch.simdvec.internal.vectorization.ESVectorizationProvider;
14+
15+
import static org.elasticsearch.simdvec.internal.vectorization.ESVectorUtilSupport.B_QUERY;
16+
17+
public class ESVectorUtil {
18+
19+
private static final ESVectorUtilSupport IMPL = ESVectorizationProvider.getInstance().getVectorUtilSupport();
20+
21+
public static long ipByteBinByte(byte[] q, byte[] d) {
22+
if (q.length != d.length * B_QUERY) {
23+
throw new IllegalArgumentException("vector dimensions incompatible: " + q.length + "!= " + B_QUERY + " x " + d.length);
24+
}
25+
return IMPL.ipByteBinByte(q, d);
26+
}
27+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the "Elastic License
4+
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
5+
* Public License v 1"; you may not use this file except in compliance with, at
6+
* your election, the "Elastic License 2.0", the "GNU Affero General Public
7+
* License v3.0 only", or the "Server Side Public License, v 1".
8+
*/
9+
10+
package org.elasticsearch.simdvec.internal.vectorization;
11+
12+
import org.apache.lucene.util.BitUtil;
13+
14+
final class DefaultESVectorUtilSupport implements ESVectorUtilSupport {
15+
16+
DefaultESVectorUtilSupport() {}
17+
18+
@Override
19+
public long ipByteBinByte(byte[] q, byte[] d) {
20+
return ipByteBinByteImpl(q, d);
21+
}
22+
23+
public static long ipByteBinByteImpl(byte[] q, byte[] d) {
24+
long ret = 0;
25+
int size = d.length;
26+
for (int i = 0; i < B_QUERY; i++) {
27+
int r = 0;
28+
long subRet = 0;
29+
for (final int upperBound = d.length & -Integer.BYTES; r < upperBound; r += Integer.BYTES) {
30+
subRet += Integer.bitCount((int) BitUtil.VH_NATIVE_INT.get(q, i * size + r) & (int) BitUtil.VH_NATIVE_INT.get(d, r));
31+
}
32+
for (; r < d.length; r++) {
33+
subRet += Integer.bitCount((q[i * size + r] & d[r]) & 0xFF);
34+
}
35+
ret += subRet << i;
36+
}
37+
return ret;
38+
}
39+
}

0 commit comments

Comments
 (0)