|
@@ -20,9 +20,11 @@
|
|
package io.milvus.param.highlevel.dml;
|
|
package io.milvus.param.highlevel.dml;
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
|
|
+import io.milvus.common.clientenum.ConsistencyLevelEnum;
|
|
import io.milvus.exception.ParamException;
|
|
import io.milvus.exception.ParamException;
|
|
import io.milvus.param.Constant;
|
|
import io.milvus.param.Constant;
|
|
import io.milvus.param.ParamUtils;
|
|
import io.milvus.param.ParamUtils;
|
|
|
|
+import io.milvus.param.dml.SearchParam;
|
|
import lombok.Getter;
|
|
import lombok.Getter;
|
|
import lombok.NonNull;
|
|
import lombok.NonNull;
|
|
import lombok.ToString;
|
|
import lombok.ToString;
|
|
@@ -47,6 +49,7 @@ public class SearchSimpleParam {
|
|
private final int limit;
|
|
private final int limit;
|
|
|
|
|
|
private final Map<String, Object> params;
|
|
private final Map<String, Object> params;
|
|
|
|
+ private final ConsistencyLevelEnum consistencyLevel;
|
|
|
|
|
|
private SearchSimpleParam(@NotNull Builder builder) {
|
|
private SearchSimpleParam(@NotNull Builder builder) {
|
|
this.collectionName = builder.collectionName;
|
|
this.collectionName = builder.collectionName;
|
|
@@ -56,6 +59,7 @@ public class SearchSimpleParam {
|
|
this.offset = builder.offset;
|
|
this.offset = builder.offset;
|
|
this.limit = builder.limit;
|
|
this.limit = builder.limit;
|
|
this.params = builder.params;
|
|
this.params = builder.params;
|
|
|
|
+ this.consistencyLevel = builder.consistencyLevel;
|
|
}
|
|
}
|
|
|
|
|
|
public static Builder newBuilder() {
|
|
public static Builder newBuilder() {
|
|
@@ -72,6 +76,7 @@ public class SearchSimpleParam {
|
|
private String filter = "";
|
|
private String filter = "";
|
|
private Long offset = 0L;
|
|
private Long offset = 0L;
|
|
private int limit = 10;
|
|
private int limit = 10;
|
|
|
|
+ private ConsistencyLevelEnum consistencyLevel = null;
|
|
|
|
|
|
private final Map<String, Object> params = new HashMap<>();
|
|
private final Map<String, Object> params = new HashMap<>();
|
|
|
|
|
|
@@ -163,6 +168,17 @@ public class SearchSimpleParam {
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * ConsistencyLevel of consistency level.
|
|
|
|
+ *
|
|
|
|
+ * @param consistencyLevel consistency level
|
|
|
|
+ * @return <code>Builder</code>
|
|
|
|
+ */
|
|
|
|
+ public Builder withConsistencyLevel(ConsistencyLevelEnum consistencyLevel) {
|
|
|
|
+ this.consistencyLevel = consistencyLevel;
|
|
|
|
+ return this;
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Verifies parameters and creates a new {@link SearchSimpleParam} instance.
|
|
* Verifies parameters and creates a new {@link SearchSimpleParam} instance.
|
|
*
|
|
*
|