From d0bd1f2cb1cd2344a1ade024866b61b64cda2180 Mon Sep 17 00:00:00 2001 From: Benjamin Trent Date: Mon, 12 Aug 2024 16:38:14 -0400 Subject: [PATCH] fixing data setup for knn yaml tests (#111794) We should do set up just in the test as that is the only place that uses this index. This way we get around any weird bwc checks around previously required parameters. Additionally, this adjusts the bwc version skip as the code fix has been backported. closes: https://github.com/elastic/elasticsearch/issues/111765 closes: https://github.com/elastic/elasticsearch/issues/111766 closes: https://github.com/elastic/elasticsearch/issues/111767 closes: https://github.com/elastic/elasticsearch/issues/111768 --- muted-tests.yml | 2 -- .../test/search.vectors/40_knn_search.yml | 23 ++++++++----------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/muted-tests.yml b/muted-tests.yml index e8eab782c0477..4a53f94162cc0 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -125,8 +125,6 @@ tests: - class: org.elasticsearch.tdigest.ComparisonTests method: testSparseGaussianDistribution issue: https://github.com/elastic/elasticsearch/issues/111721 -- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT - issue: https://github.com/elastic/elasticsearch/issues/111765 - class: org.elasticsearch.upgrades.FullClusterRestartIT method: testSnapshotRestore {cluster=OLD} issue: https://github.com/elastic/elasticsearch/issues/111777 diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/40_knn_search.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/40_knn_search.yml index 8c0e1f45cf305..b3d86a066550e 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/40_knn_search.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/40_knn_search.yml @@ -28,17 +28,6 @@ setup: type: hnsw m: 16 ef_construction: 200 - - - do: - indices.create: - index: test_empty - body: - mappings: - properties: - vector: - type: dense_vector - - - do: index: index: test @@ -530,8 +519,16 @@ setup: --- "kNN search on empty index should return 0 results and not an error": - requires: - cluster_features: "gte_v8.16.0" - reason: 'Error fixed in 8.16.0' + cluster_features: "gte_v8.15.1" + reason: 'Error fixed in 8.15.1' + - do: + indices.create: + index: test_empty + body: + mappings: + properties: + vector: + type: dense_vector - do: search: index: test_empty