Package io.milvus.param.highlevel.dml
Class SearchSimpleParam.Builder
java.lang.Object
io.milvus.param.highlevel.dml.SearchSimpleParam.Builder
- Enclosing class:
SearchSimpleParam
Builder for
SearchSimpleParam class.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Verifies parameters and creates a newSearchSimpleParaminstance.withCollectionName(@NonNull String collectionName) Sets the collection name.withConsistencyLevel(ConsistencyLevelEnum consistencyLevel) ConsistencyLevel of consistency level.withFilter(@NonNull String filter) Sets expression to filter out entities before searching (Optional).Specify a value to control the returned number of entities.withOffset(@NonNull Long offset) Specify a position to return results.withOutputFields(@NonNull List<String> outputFields) Specifies output fields (Optional).withVectors(@NonNull List<?> vectors) Sets the target vectors.
-
Method Details
-
withCollectionName
Sets the collection name. Collection name cannot be empty or null.- Parameters:
collectionName- collection name- Returns:
Builder
-
withFilter
Sets expression to filter out entities before searching (Optional).- Parameters:
filter- filtering expression- Returns:
Builder- See Also:
-
withOutputFields
Specifies output fields (Optional).- Parameters:
outputFields- output fields- Returns:
Builder
-
withVectors
Sets the target vectors.- Parameters:
vectors- list of target vectors: List of List Float;- Returns:
Builder
-
withOffset
Specify a position to return results. Only take effect when the 'limit' value is specified. Default value is 0, start from begin.- Parameters:
offset- a value to define the position- Returns:
Builder
-
withLimit
Specify a value to control the returned number of entities. Must be a positive value. Default value is 10, will return without limit. To maintain consistency with the parameter type of the query interface, the field is declared as Long. In reality, the field is of type int.- Parameters:
limit- a value to define the limit of returned entities- Returns:
Builder
-
withConsistencyLevel
ConsistencyLevel of consistency level.- Parameters:
consistencyLevel- consistency level- Returns:
Builder
-
build
Verifies parameters and creates a newSearchSimpleParaminstance.- Returns:
SearchSimpleParam- Throws:
ParamException
-