Skip to content

Commit

Permalink
Kderusso/sparse vector ci failure (#117930)
Browse files Browse the repository at this point in the history
* Fix CI failure in SparseVectorQueryBuilderTests

* Unmute test
  • Loading branch information
kderusso authored Dec 4, 2024
1 parent 2244070 commit 97601b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,6 @@ tests:
issue: https://github.com/elastic/elasticsearch/issues/117815
- class: org.elasticsearch.xpack.ml.integration.DatafeedJobsRestIT
issue: https://github.com/elastic/elasticsearch/issues/111319
- class: org.elasticsearch.xpack.core.ml.search.SparseVectorQueryBuilderTests
method: testToQuery
issue: https://github.com/elastic/elasticsearch/issues/117904
- class: org.elasticsearch.packaging.test.ArchiveGenerateInitialCredentialsTests
method: test20NoAutoGenerationWhenAutoConfigurationDisabled
issue: https://github.com/elastic/elasticsearch/issues/117891
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) {
return;
}

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

0 comments on commit 97601b1

Please sign in to comment.