Skip to content

Commit 7d4bbcc

Browse files
authored
Fix for RescoreKnnVectorQueryIT to ensure that BBQ_IVF format is enabled (#129830)
1 parent c7a5c59 commit 7d4bbcc

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

muted-tests.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -559,21 +559,18 @@ tests:
559559
- class: org.elasticsearch.test.apmintegration.TracesApmIT
560560
method: testApmIntegration
561561
issue: https://github.com/elastic/elasticsearch/issues/129651
562-
- class: org.elasticsearch.search.query.RescoreKnnVectorQueryIT
563-
method: testKnnSearchRescore
564-
issue: https://github.com/elastic/elasticsearch/issues/129713
565562
- class: org.elasticsearch.snapshots.SnapshotShutdownIT
566563
method: testSnapshotShutdownProgressTracker
567564
issue: https://github.com/elastic/elasticsearch/issues/129752
568565
- class: org.elasticsearch.xpack.security.SecurityRolesMultiProjectIT
569566
method: testUpdatingFileBasedRoleAffectsAllProjects
570567
issue: https://github.com/elastic/elasticsearch/issues/129775
571-
- class: org.elasticsearch.search.query.RescoreKnnVectorQueryIT
572-
method: testKnnQueryRescore
573-
issue: https://github.com/elastic/elasticsearch/issues/129809
574-
- class: org.elasticsearch.search.query.RescoreKnnVectorQueryIT
575-
method: testKnnRetriever
576-
issue: https://github.com/elastic/elasticsearch/issues/129818
568+
- class: org.elasticsearch.qa.verify_version_constants.VerifyVersionConstantsIT
569+
method: testLuceneVersionConstant
570+
issue: https://github.com/elastic/elasticsearch/issues/125638
571+
- class: org.elasticsearch.xpack.esql.qa.single_node.GenerativeIT
572+
method: test
573+
issue: https://github.com/elastic/elasticsearch/issues/129819
577574
- class: org.elasticsearch.index.engine.ThreadPoolMergeExecutorServiceDiskSpaceTests
578575
method: testAbortingOrRunningMergeTaskHoldsUpBudget
579576
issue: https://github.com/elastic/elasticsearch/issues/129823

server/src/internalClusterTest/java/org/elasticsearch/search/query/RescoreKnnVectorQueryIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ protected Map<String, Function<Map<String, Object>, Object>> pluginScripts() {
8585
public void setup() throws IOException {
8686
String type = randomFrom(
8787
Arrays.stream(VectorIndexType.values())
88-
.filter(VectorIndexType::isQuantized)
88+
.filter(t -> t.isQuantized() && t.isEnabled())
8989
.map(t -> t.name().toLowerCase(Locale.ROOT))
9090
.collect(Collectors.toCollection(ArrayList::new))
9191
);

server/src/main/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapper.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1655,11 +1655,16 @@ public boolean supportsElementType(ElementType elementType) {
16551655
public boolean supportsDimension(int dims) {
16561656
return true;
16571657
}
1658+
1659+
@Override
1660+
public boolean isEnabled() {
1661+
return IVF_FORMAT.isEnabled();
1662+
}
16581663
};
16591664

16601665
public static Optional<VectorIndexType> fromString(String type) {
16611666
return Stream.of(VectorIndexType.values())
1662-
.filter(vectorIndexType -> vectorIndexType != VectorIndexType.BBQ_IVF || IVF_FORMAT.isEnabled())
1667+
.filter(VectorIndexType::isEnabled)
16631668
.filter(vectorIndexType -> vectorIndexType.name.equals(type))
16641669
.findFirst();
16651670
}
@@ -1686,6 +1691,10 @@ public boolean isQuantized() {
16861691
return quantized;
16871692
}
16881693

1694+
public boolean isEnabled() {
1695+
return true;
1696+
}
1697+
16891698
public String getName() {
16901699
return name;
16911700
}

0 commit comments

Comments
 (0)