Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kderusso/sparse vector ci failure #117930

Merged
merged 3 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,6 @@ tests:
issue: https://github.com/elastic/elasticsearch/issues/111319
- class: org.elasticsearch.validation.DotPrefixClientYamlTestSuiteIT
issue: https://github.com/elastic/elasticsearch/issues/117893
- class: org.elasticsearch.xpack.core.ml.search.SparseVectorQueryBuilderTests
method: testToQuery
issue: https://github.com/elastic/elasticsearch/issues/117904

# Examples:
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@ public void testToQuery() throws IOException {

private void testDoToQuery(SparseVectorQueryBuilder queryBuilder, SearchExecutionContext context) throws IOException {
Query query = queryBuilder.doToQuery(context);

// test query builder can randomly have no vectors, which rewrites to a MatchNoneQuery - nothing more to do in this case.
if (query instanceof MatchNoDocsQuery) {
Samiul-TheSoccerFan marked this conversation as resolved.
Show resolved Hide resolved
return;
}

assertTrue(query instanceof SparseVectorQueryWrapper);
var sparseQuery = (SparseVectorQueryWrapper) query;
if (queryBuilder.shouldPruneTokens()) {
Expand Down