Skip to content

Commit bd6a476

Browse files
authored
fix vector result is null ,leading to NPE (#1717)
Signed-off-by: kun <kunyinglang@163.com>
1 parent 55b7fd5 commit bd6a476

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sdk-core/src/main/java/io/milvus/v2/utils/VectorUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public SearchRequest ConvertToGrpcSearchRequest(SearchReq request) {
159159

160160
// prepare target, the input could be vectors or string list for doc-in-doc-out
161161
List<BaseVector> vectors = request.getData();
162-
if (vectors.isEmpty()) {
162+
if (vectors == null || vectors.isEmpty()) {
163163
throw new MilvusClientException(ErrorCode.INVALID_PARAMS, "Target data list of search request is empty.");
164164
}
165165

0 commit comments

Comments
 (0)