Skip to content

Commit d5e7caa

Browse files
Merge branch 'main' into fix-semantic-query-rewrite-boost-issue
2 parents 70b228e + e437163 commit d5e7caa

File tree

49 files changed

+2919
-101
lines changed

Some content is hidden

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

49 files changed

+2919
-101
lines changed

docs/changelog/128291.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 128291
2+
summary: Make `dense_vector` fields updatable to bbq_flat/bbq_hnsw
3+
area: Vector Search
4+
type: enhancement
5+
issues: []

docs/changelog/129200.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 129200
2+
summary: Simplified Linear Retriever
3+
area: Search
4+
type: enhancement
5+
issues: []

docs/changelog/129440.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 129440
2+
summary: Fix filtered knn vector search when query timeouts are enabled
3+
area: Vector Search
4+
type: bug
5+
issues: []

docs/reference/elasticsearch/mapping-reference/dense-vector.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,10 +397,10 @@ POST /my-bit-vectors/_search?filter_path=hits.hits
397397
To better accommodate scaling and performance needs, updating the `type` setting in `index_options` is possible with the [Update Mapping API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping), according to the following graph (jumps allowed):
398398

399399
```txt
400-
flat --> int8_flat --> int4_flat --> hnsw --> int8_hnsw --> int4_hnsw
400+
flat --> int8_flat --> int4_flat --> bbq_flat --> hnsw --> int8_hnsw --> int4_hnsw --> bbq_hnsw
401401
```
402402

403-
For updating all HNSW types (`hnsw`, `int8_hnsw`, `int4_hnsw`) the number of connections `m` must either stay the same or increase. For scalar quantized formats (`int8_flat`, `int4_flat`, `int8_hnsw`, `int4_hnsw`) the `confidence_interval` must always be consistent (once defined, it cannot change).
403+
For updating all HNSW types (`hnsw`, `int8_hnsw`, `int4_hnsw`, `bbq_hnsw`) the number of connections `m` must either stay the same or increase. For the scalar quantized formats `int8_flat`, `int4_flat`, `int8_hnsw` and `int4_hnsw` the `confidence_interval` must always be consistent (once defined, it cannot change).
404404

405405
Updating `type` in `index_options` will fail in all other scenarios.
406406

muted-tests.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,6 @@ tests:
271271
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
272272
method: test {p0=transform/transforms_start_stop/Test schedule_now on an already started transform}
273273
issue: https://github.com/elastic/elasticsearch/issues/120720
274-
- class: org.elasticsearch.index.engine.ThreadPoolMergeExecutorServiceTests
275-
method: testIORateIsAdjustedForRunningMergeTasks
276-
issue: https://github.com/elastic/elasticsearch/issues/125842
277274
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
278275
method: test {p0=transform/transforms_start_stop/Verify start transform creates destination index with appropriate mapping}
279276
issue: https://github.com/elastic/elasticsearch/issues/125854
@@ -301,9 +298,6 @@ tests:
301298
- class: org.elasticsearch.index.engine.ThreadPoolMergeSchedulerTests
302299
method: testSchedulerCloseWaitsForRunningMerge
303300
issue: https://github.com/elastic/elasticsearch/issues/125236
304-
- class: org.elasticsearch.xpack.security.SecurityRolesMultiProjectIT
305-
method: testUpdatingFileBasedRoleAffectsAllProjects
306-
issue: https://github.com/elastic/elasticsearch/issues/126223
307301
- class: org.elasticsearch.packaging.test.DockerTests
308302
method: test020PluginsListWithNoPlugins
309303
issue: https://github.com/elastic/elasticsearch/issues/126232
@@ -565,6 +559,9 @@ tests:
565559
- class: org.elasticsearch.xpack.ilm.actions.ShrinkActionIT
566560
method: testShrinkDuringSnapshot
567561
issue: https://github.com/elastic/elasticsearch/issues/129491
562+
- class: org.elasticsearch.xpack.security.PermissionsIT
563+
method: testWhenUserLimitedByOnlyAliasOfIndexCanWriteToIndexWhichWasRolledoverByILMPolicy
564+
issue: https://github.com/elastic/elasticsearch/issues/129481
568565

569566
# Examples:
570567
#

qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/DenseVectorMappingUpdateIT.java

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import org.elasticsearch.client.Request;
1616
import org.elasticsearch.client.Response;
1717
import org.elasticsearch.common.Strings;
18+
import org.elasticsearch.index.mapper.SourceFieldMapper;
1819
import org.elasticsearch.xcontent.XContentBuilder;
1920
import org.elasticsearch.xcontent.XContentType;
2021

@@ -31,6 +32,8 @@
3132
*/
3233
public class DenseVectorMappingUpdateIT extends AbstractRollingUpgradeTestCase {
3334

35+
private static final String SYNTHETIC_SOURCE_FEATURE = "gte_v8.12.0";
36+
3437
private static final String BULK1 = """
3538
{"index": {"_id": "1"}}
3639
{"embedding": [1, 1, 1, 1]}
@@ -86,10 +89,22 @@ public void testDenseVectorMappingUpdateOnOldCluster() throws IOException {
8689
String indexName = "test_index";
8790
if (isOldCluster()) {
8891
Request createIndex = new Request("PUT", "/" + indexName);
89-
XContentBuilder mappings = XContentBuilder.builder(XContentType.JSON.xContent())
90-
.startObject()
91-
.startObject("mappings")
92-
.startObject("properties")
92+
boolean useSyntheticSource = randomBoolean() && oldClusterHasFeature(SYNTHETIC_SOURCE_FEATURE);
93+
94+
boolean useIndexSetting = SourceFieldMapper.onOrAfterDeprecateModeVersion(getOldClusterIndexVersion());
95+
XContentBuilder payload = XContentBuilder.builder(XContentType.JSON.xContent()).startObject();
96+
if (useSyntheticSource) {
97+
if (useIndexSetting) {
98+
payload.startObject("settings").field("index.mapping.source.mode", "synthetic").endObject();
99+
}
100+
}
101+
payload.startObject("mappings");
102+
if (useIndexSetting == false) {
103+
payload.startObject("_source");
104+
payload.field("mode", "synthetic");
105+
payload.endObject();
106+
}
107+
payload.startObject("properties")
93108
.startObject("embedding")
94109
.field("type", "dense_vector")
95110
.field("index", "true")
@@ -104,7 +119,7 @@ public void testDenseVectorMappingUpdateOnOldCluster() throws IOException {
104119
.endObject()
105120
.endObject()
106121
.endObject();
107-
createIndex.setJsonEntity(Strings.toString(mappings));
122+
createIndex.setJsonEntity(Strings.toString(payload));
108123
client().performRequest(createIndex);
109124
Request index = new Request("POST", "/" + indexName + "/_bulk/");
110125
index.addParameter("refresh", "true");

0 commit comments

Comments
 (0)