Skip to content

Commit

Permalink
Fix enum switch case error in AlibabaSearchService (elastic#114504)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
2 people authored and matthewabbott committed Oct 10, 2024
1 parent 7881da3 commit 034f408
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ protected void doChunkedInfer(

private EmbeddingRequestChunker.EmbeddingType getEmbeddingTypeFromTaskType(TaskType taskType) {
return switch (taskType) {
case TaskType.TEXT_EMBEDDING -> EmbeddingRequestChunker.EmbeddingType.FLOAT;
case TaskType.SPARSE_EMBEDDING -> EmbeddingRequestChunker.EmbeddingType.SPARSE;
case TEXT_EMBEDDING -> EmbeddingRequestChunker.EmbeddingType.FLOAT;
case SPARSE_EMBEDDING -> EmbeddingRequestChunker.EmbeddingType.SPARSE;
default -> throw new IllegalArgumentException("Unsupported task type for chunking: " + taskType);
};
}
Expand Down

0 comments on commit 034f408

Please sign in to comment.