Skip to content

Commit 4312f0f

Browse files
yeyinglanglentitude2tkyhmo
authored
Last Step: Remove Lombok from milvus sdk-core (#1615)
* support stageManager & stageFileManager (#1549) Signed-off-by: lentitude2tk <[email protected]> * Support partial update (#1566) Signed-off-by: yhmo <[email protected]> * Support passing request-id and unixmsec to server (#1573) Signed-off-by: yhmo <[email protected]> * Fix a defect of QueryReq (#1574) Signed-off-by: yhmo <[email protected]> * support batch describe collection (#1578) Signed-off-by: lentitude2tk <[email protected]> * Fix a bug of QueryIterator that offset cannot exceed 16384 (#1579) Signed-off-by: yhmo <[email protected]> * add shardNum field if listCollection (#1585) Signed-off-by: lentitude2tk <[email protected]> * Support FunctionScore, multi-reranker for search/hybridSearch (#1588) Signed-off-by: yhmo <[email protected]> * Second Step: Remove Lombok from io.milvus.v2 Signed-off-by: kun <[email protected]> StructArray: schema support (#448) * struct schema Signed-off-by: SpadeA <[email protected]> * make all Signed-off-by: SpadeA <[email protected]> * add field id to struct schema Signed-off-by: SpadeA <[email protected]> * rename StructSchema to StructField Signed-off-by: SpadeA <[email protected]> * some progress Signed-off-by: SpadeA <[email protected]> * array of vector Signed-off-by: SpadeA <[email protected]> * array of vector Signed-off-by: SpadeA-Tang <[email protected]> * struct to array struct Signed-off-by: SpadeA <[email protected]> * refine name Signed-off-by: SpadeA <[email protected]> * rename Signed-off-by: SpadeA <[email protected]> * refine position Signed-off-by: SpadeA <[email protected]> * rename Signed-off-by: SpadeA <[email protected]> * rename Signed-off-by: SpadeA <[email protected]> * add type params Signed-off-by: SpadeA <[email protected]> * rename Signed-off-by: SpadeA <[email protected]> * address comment Signed-off-by: SpadeA <[email protected]> * address comment Signed-off-by: SpadeA <[email protected]> --------- Signed-off-by: SpadeA <[email protected]> Signed-off-by: SpadeA-Tang <[email protected]> * Third Step: Remove Lombok from milvus sdk-core Signed-off-by: kun <[email protected]> --------- Signed-off-by: lentitude2tk <[email protected]> Signed-off-by: yhmo <[email protected]> Signed-off-by: SpadeA <[email protected]> Signed-off-by: SpadeA-Tang <[email protected]> Signed-off-by: kun <[email protected]> Co-authored-by: xushuang.hu <[email protected]> Co-authored-by: groot <[email protected]>
1 parent 7e0f15e commit 4312f0f

File tree

147 files changed

+5444
-1315
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+5444
-1315
lines changed

examples/src/main/java/io/milvus/v2/ArrayFieldExample.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ public static void main(String[] args) {
142142
// Get row count, set ConsistencyLevel.STRONG to sync the data to query node so that data is visible
143143
QueryResp countR = client.query(QueryReq.builder()
144144
.collectionName(COLLECTION_NAME)
145-
.filter("")
146145
.outputFields(Collections.singletonList("count(*)"))
147146
.consistencyLevel(ConsistencyLevel.STRONG)
148147
.build());

examples/src/main/java/io/milvus/v2/BinaryVectorExample.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ public static void main(String[] args) {
114114
// Get row count, set ConsistencyLevel.STRONG to sync the data to query node so that data is visible
115115
QueryResp countR = client.query(QueryReq.builder()
116116
.collectionName(COLLECTION_NAME)
117-
.filter("")
118117
.outputFields(Collections.singletonList("count(*)"))
119118
.consistencyLevel(ConsistencyLevel.STRONG)
120119
.build());

examples/src/main/java/io/milvus/v2/FullTextSearchExample.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ public static void main(String[] args) {
143143
// Get row count, set ConsistencyLevel.STRONG to sync the data to query node so that data is visible
144144
QueryResp countR = client.query(QueryReq.builder()
145145
.collectionName(COLLECTION_NAME)
146-
.filter("")
147146
.outputFields(Collections.singletonList("count(*)"))
148147
.consistencyLevel(ConsistencyLevel.STRONG)
149148
.build());

examples/src/main/java/io/milvus/v2/GeneralExample.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@
2727
import io.milvus.v2.common.ConsistencyLevel;
2828
import io.milvus.v2.common.DataType;
2929
import io.milvus.v2.common.IndexParam;
30-
import io.milvus.v2.service.collection.request.*;
30+
import io.milvus.v2.service.collection.request.AddFieldReq;
31+
import io.milvus.v2.service.collection.request.CreateCollectionReq;
32+
import io.milvus.v2.service.collection.request.DescribeCollectionReq;
33+
import io.milvus.v2.service.collection.request.DropCollectionReq;
34+
import io.milvus.v2.service.collection.request.LoadCollectionReq;
35+
import io.milvus.v2.service.collection.request.ReleaseCollectionReq;
3136
import io.milvus.v2.service.collection.response.DescribeCollectionResp;
3237
import io.milvus.v2.service.collection.response.ListCollectionsResp;
3338
import io.milvus.v2.service.partition.request.CreatePartitionReq;
@@ -39,7 +44,12 @@
3944
import io.milvus.v2.service.vector.response.InsertResp;
4045
import io.milvus.v2.service.vector.response.SearchResp;
4146

42-
import java.util.*;
47+
import java.util.ArrayList;
48+
import java.util.Collections;
49+
import java.util.HashMap;
50+
import java.util.List;
51+
import java.util.Map;
52+
import java.util.Random;
4353

4454
public class GeneralExample {
4555
private static final MilvusClientV2 client;

examples/src/main/java/io/milvus/v2/HybridSearchExample.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import io.milvus.v2.service.collection.request.CreateCollectionReq;
3232
import io.milvus.v2.service.collection.request.DropCollectionReq;
3333
import io.milvus.v2.service.vector.request.AnnSearchReq;
34+
import io.milvus.v2.service.vector.request.FunctionScore;
3435
import io.milvus.v2.service.vector.request.HybridSearchReq;
3536
import io.milvus.v2.service.vector.request.InsertReq;
3637
import io.milvus.v2.service.vector.request.QueryReq;
@@ -122,7 +123,6 @@ private void createCollection() {
122123
.metricType(BINARY_VECTOR_METRIC)
123124
.build());
124125
Map<String,Object> fv16Params = new HashMap<>();
125-
fv16Params.clear();
126126
fv16Params.put("M",16);
127127
fv16Params.put("efConstruction",64);
128128
indexes.add(IndexParam.builder()
@@ -175,7 +175,6 @@ private void hybridSearch() {
175175
// Get row count, set ConsistencyLevel.STRONG to sync the data to query node so that data is visible
176176
QueryResp countR = client.query(QueryReq.builder()
177177
.collectionName(COLLECTION_NAME)
178-
.filter("")
179178
.outputFields(Collections.singletonList("count(*)"))
180179
.consistencyLevel(ConsistencyLevel.STRONG)
181180
.build());
@@ -213,7 +212,9 @@ private void hybridSearch() {
213212
HybridSearchReq hybridSearchReq = HybridSearchReq.builder()
214213
.collectionName(COLLECTION_NAME)
215214
.searchRequests(searchRequests)
216-
.ranker(WeightedRanker.builder().weights(Arrays.asList(0.2f, 0.5f, 0.6f)).build())
215+
.functionScore(FunctionScore.builder()
216+
.addFunction(WeightedRanker.builder().weights(Arrays.asList(0.2f, 0.5f, 0.6f)).build())
217+
.build())
217218
.limit(5)
218219
.consistencyLevel(ConsistencyLevel.BOUNDED)
219220
.build();

examples/src/main/java/io/milvus/v2/Int8VectorExample.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ public static void main(String[] args) {
129129
// Get row count, set ConsistencyLevel.STRONG to sync the data to query node so that data is visible
130130
QueryResp countR = client.query(QueryReq.builder()
131131
.collectionName(COLLECTION_NAME)
132-
.filter("")
133132
.outputFields(Collections.singletonList("count(*)"))
134133
.consistencyLevel(ConsistencyLevel.STRONG)
135134
.build());

examples/src/main/java/io/milvus/v2/IteratorExample.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ private static void buildCollection() {
119119
// Check row count
120120
QueryResp queryResp = client.query(QueryReq.builder()
121121
.collectionName(COLLECTION_NAME)
122-
.filter("")
123122
.outputFields(Collections.singletonList("count(*)"))
124123
.consistencyLevel(ConsistencyLevel.STRONG)
125124
.build());

examples/src/main/java/io/milvus/v2/JsonFieldExample.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ public static void main(String[] args) {
147147
// Get row count, set ConsistencyLevel.STRONG to sync the data to query node so that data is visible
148148
QueryResp countR = client.query(QueryReq.builder()
149149
.collectionName(COLLECTION_NAME)
150-
.filter("")
151150
.outputFields(Collections.singletonList("count(*)"))
152151
.consistencyLevel(ConsistencyLevel.STRONG)
153152
.build());

examples/src/main/java/io/milvus/v2/NullAndDefaultExample.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ public static void main(String[] args) {
169169
// Get row count, set ConsistencyLevel.STRONG to sync the data to query node so that data is visible
170170
QueryResp countR = client.query(QueryReq.builder()
171171
.collectionName(COLLECTION_NAME)
172-
.filter("")
173172
.outputFields(Collections.singletonList("count(*)"))
174173
.consistencyLevel(ConsistencyLevel.STRONG)
175174
.build());

examples/src/main/java/io/milvus/v2/SimpleExample.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ public static void main(String[] args) {
7070
// Get row count, set ConsistencyLevel.STRONG to sync the data to query node so that data is visible
7171
QueryResp countR = client.query(QueryReq.builder()
7272
.collectionName(collectionName)
73-
.filter("")
7473
.outputFields(Collections.singletonList("count(*)"))
7574
.consistencyLevel(ConsistencyLevel.STRONG)
7675
.build());

0 commit comments

Comments
 (0)