Skip to content

Commit

Permalink
Fix CI failure in SparseVectorQueryBuilderTests
Browse files Browse the repository at this point in the history
  • Loading branch information
kderusso committed Dec 3, 2024
1 parent f5ff9c6 commit b945ee2
Showing 1 changed file with 6 additions and 0 deletions.
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 b945ee2

Please sign in to comment.