From c0aafb7463807e985078582c22a51736261c8ea9 Mon Sep 17 00:00:00 2001
From: PiercarloSlavazza <3389306+PiercarloSlavazza@users.noreply.github.com>
Date: Fri, 10 May 2024 08:53:28 +0200
Subject: [PATCH] Bugfix: MetricType was not initialized in
io.milvus.orm.iterator.SearchIterator#executeNextSearch (#881) (#888)
Signed-off-by: PiercarloSlavazza
Co-authored-by: Piercarlo Slavazza
---
src/main/java/io/milvus/orm/iterator/SearchIterator.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/main/java/io/milvus/orm/iterator/SearchIterator.java b/src/main/java/io/milvus/orm/iterator/SearchIterator.java
index 2b886ff10..d92478881 100644
--- a/src/main/java/io/milvus/orm/iterator/SearchIterator.java
+++ b/src/main/java/io/milvus/orm/iterator/SearchIterator.java
@@ -229,6 +229,7 @@ private SearchResultsWrapper executeNextSearch(Map params, Strin
.withOutFields(searchIteratorParam.getOutFields())
.withRoundDecimal(searchIteratorParam.getRoundDecimal())
.withParams(JacksonUtils.toJsonString(params))
+ .withMetricType(MetricType.valueOf(searchIteratorParam.getMetricType()))
.withIgnoreGrowing(searchIteratorParam.isIgnoreGrowing());
if (!StringUtils.isNullOrEmpty(searchIteratorParam.getGroupByFieldName())) {