diff --git a/x-pack/plugin/ml/qa/multi-cluster-tests-with-security/src/test/resources/rest-api-spec/test/multi_cluster/50_sparse_vector.yml b/x-pack/plugin/ml/qa/multi-cluster-tests-with-security/src/test/resources/rest-api-spec/test/multi_cluster/50_sparse_vector.yml index b2c263d291557..8330ea1555def 100644 --- a/x-pack/plugin/ml/qa/multi-cluster-tests-with-security/src/test/resources/rest-api-spec/test/multi_cluster/50_sparse_vector.yml +++ b/x-pack/plugin/ml/qa/multi-cluster-tests-with-security/src/test/resources/rest-api-spec/test/multi_cluster/50_sparse_vector.yml @@ -136,7 +136,7 @@ teardown: index: index-with-sparse-vector body: query: - text_expansion: + sparse_vector: ml.tokens: model_id: text_expansion_model model_text: "octopus comforter smells" @@ -154,7 +154,7 @@ teardown: index: index-with-sparse-vector body: query: - text_expansion: + sparse_vector: ml.tokens: model_id: text_expansion_model model_text: "octopus comforter smells" @@ -174,7 +174,7 @@ teardown: index: index-with-sparse-vector body: query: - text_expansion: + sparse_vector: ml.tokens: model_id: text_expansion_model model_text: "octopus comforter smells" @@ -190,7 +190,7 @@ teardown: index: index-with-sparse-vector body: query: - text_expansion: + sparse_vector: ml.tokens: model_id: text_expansion_model model_text: "octopus comforter smells" @@ -215,7 +215,7 @@ teardown: index: index-with-sparse-vector body: query: - text_expansion: + sparse_vector: ml.tokens: model_id: text_expansion_model model_text: "octopus comforter smells" @@ -234,7 +234,7 @@ teardown: index: index-with-sparse-vector body: query: - text_expansion: + sparse_vector: ml.tokens: model_id: text_expansion_model model_text: "octopus comforter smells" @@ -243,82 +243,3 @@ teardown: tokens_weight_threshold: 0.4 only_score_pruned_tokens: true - match: { hits.total.value: 0 } - ---- -"Test weighted tokens search": - - skip: - version: " - 8.12.99" - reason: "weighted token search introduced in 8.13.0" - - - do: - search: - index: index-with-sparse-vector - body: - query: - weighted_tokens: - ml.tokens: - tokens: [{"the": 1.0}, {"comforter":1.0}, {"smells":1.0}, {"bad": 1.0}] - pruning_config: - tokens_freq_ratio_threshold: 1 - tokens_weight_threshold: 0.4 - only_score_pruned_tokens: false - - match: { hits.total.value: 5 } - - match: { hits.hits.0._source.source_text: "the octopus comforter smells" } - ---- -"Test weighted tokens search with default pruning config": - - skip: - version: " - 8.12.99" - reason: "weighted token search introduced in 8.13.0" - - - do: - search: - index: index-with-sparse-vector - body: - query: - weighted_tokens: - ml.tokens: - tokens: [{"the": 1.0}, {"comforter":1.0}, {"smells":1.0}, {"bad": 1.0}] - pruning_config: {} - - match: { hits.total.value: 5 } - - match: { hits.hits.0._source.source_text: "the octopus comforter smells" } - ---- -"Test weighted tokens search only scoring pruned tokens": - - skip: - version: " - 8.12.99" - reason: "weighted token search introduced in 8.13.0" - - - do: - search: - index: index-with-sparse-vector - body: - query: - weighted_tokens: - ml.tokens: - tokens: [{"the": 1.0}, {"comforter":1.0}, {"smells":1.0}, {"bad": 1.0}] - pruning_config: - tokens_freq_ratio_threshold: 4 - tokens_weight_threshold: 0.4 - only_score_pruned_tokens: true - - match: { hits.total.value: 0 } - ---- -"Test weighted tokens search that prunes tokens based on frequency": - - skip: - version: " - 8.12.99" - reason: "weighted token search introduced in 8.13.0" - - - do: - search: - index: index-with-sparse-vector - body: - query: - weighted_tokens: - ml.tokens: - tokens: [{"the": 1.0}, {"octopus":1.0}, {"comforter":1.0}, {"is": 1.0}, {"the": 1.0}, {"best": 1.0}, {"of": 1.0}, {"the": 1.0}, {"bunch": 1.0}] - pruning_config: - tokens_freq_ratio_threshold: 3 - tokens_weight_threshold: 0.4 - only_score_pruned_tokens: true - - match: { hits.total.value: 0 } diff --git a/x-pack/plugin/ml/qa/multi-cluster-tests-with-security/src/test/resources/rest-api-spec/test/remote_cluster/50_sparse_vector.yml b/x-pack/plugin/ml/qa/multi-cluster-tests-with-security/src/test/resources/rest-api-spec/test/remote_cluster/50_sparse_vector.yml index b2c263d291557..8330ea1555def 100644 --- a/x-pack/plugin/ml/qa/multi-cluster-tests-with-security/src/test/resources/rest-api-spec/test/remote_cluster/50_sparse_vector.yml +++ b/x-pack/plugin/ml/qa/multi-cluster-tests-with-security/src/test/resources/rest-api-spec/test/remote_cluster/50_sparse_vector.yml @@ -136,7 +136,7 @@ teardown: index: index-with-sparse-vector body: query: - text_expansion: + sparse_vector: ml.tokens: model_id: text_expansion_model model_text: "octopus comforter smells" @@ -154,7 +154,7 @@ teardown: index: index-with-sparse-vector body: query: - text_expansion: + sparse_vector: ml.tokens: model_id: text_expansion_model model_text: "octopus comforter smells" @@ -174,7 +174,7 @@ teardown: index: index-with-sparse-vector body: query: - text_expansion: + sparse_vector: ml.tokens: model_id: text_expansion_model model_text: "octopus comforter smells" @@ -190,7 +190,7 @@ teardown: index: index-with-sparse-vector body: query: - text_expansion: + sparse_vector: ml.tokens: model_id: text_expansion_model model_text: "octopus comforter smells" @@ -215,7 +215,7 @@ teardown: index: index-with-sparse-vector body: query: - text_expansion: + sparse_vector: ml.tokens: model_id: text_expansion_model model_text: "octopus comforter smells" @@ -234,7 +234,7 @@ teardown: index: index-with-sparse-vector body: query: - text_expansion: + sparse_vector: ml.tokens: model_id: text_expansion_model model_text: "octopus comforter smells" @@ -243,82 +243,3 @@ teardown: tokens_weight_threshold: 0.4 only_score_pruned_tokens: true - match: { hits.total.value: 0 } - ---- -"Test weighted tokens search": - - skip: - version: " - 8.12.99" - reason: "weighted token search introduced in 8.13.0" - - - do: - search: - index: index-with-sparse-vector - body: - query: - weighted_tokens: - ml.tokens: - tokens: [{"the": 1.0}, {"comforter":1.0}, {"smells":1.0}, {"bad": 1.0}] - pruning_config: - tokens_freq_ratio_threshold: 1 - tokens_weight_threshold: 0.4 - only_score_pruned_tokens: false - - match: { hits.total.value: 5 } - - match: { hits.hits.0._source.source_text: "the octopus comforter smells" } - ---- -"Test weighted tokens search with default pruning config": - - skip: - version: " - 8.12.99" - reason: "weighted token search introduced in 8.13.0" - - - do: - search: - index: index-with-sparse-vector - body: - query: - weighted_tokens: - ml.tokens: - tokens: [{"the": 1.0}, {"comforter":1.0}, {"smells":1.0}, {"bad": 1.0}] - pruning_config: {} - - match: { hits.total.value: 5 } - - match: { hits.hits.0._source.source_text: "the octopus comforter smells" } - ---- -"Test weighted tokens search only scoring pruned tokens": - - skip: - version: " - 8.12.99" - reason: "weighted token search introduced in 8.13.0" - - - do: - search: - index: index-with-sparse-vector - body: - query: - weighted_tokens: - ml.tokens: - tokens: [{"the": 1.0}, {"comforter":1.0}, {"smells":1.0}, {"bad": 1.0}] - pruning_config: - tokens_freq_ratio_threshold: 4 - tokens_weight_threshold: 0.4 - only_score_pruned_tokens: true - - match: { hits.total.value: 0 } - ---- -"Test weighted tokens search that prunes tokens based on frequency": - - skip: - version: " - 8.12.99" - reason: "weighted token search introduced in 8.13.0" - - - do: - search: - index: index-with-sparse-vector - body: - query: - weighted_tokens: - ml.tokens: - tokens: [{"the": 1.0}, {"octopus":1.0}, {"comforter":1.0}, {"is": 1.0}, {"the": 1.0}, {"best": 1.0}, {"of": 1.0}, {"the": 1.0}, {"bunch": 1.0}] - pruning_config: - tokens_freq_ratio_threshold: 3 - tokens_weight_threshold: 0.4 - only_score_pruned_tokens: true - - match: { hits.total.value: 0 }