object ServiceClient
interface to interact with the Milvus vector database the ServiceClient.config needs to be set before use
//use api ServiceClient.config = Util.readConfig(...path to config...) ServiceClient.createCollection ServiceClient.createIndex ServiceClient.createPartition(...name...) ServiceClient.insert(...data...) //example config below "milvus": { "host": "localhost", "port": "19530", "collection": "mdxBehavior", "indexType": "IVF_FLAT", "metricType": "IP", "vectorDim": "256", "sensorIdMaxLength": "100", "indexParam": "{\"nlist\":128}", "partitioningStrategy": "day", "clusterThreshold": "0.9", "triggerInterval": "60 seconds" }
- Alphabetic
- By Inheritance
- ServiceClient
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
lazy val
blockingStub: MilvusServiceBlockingStub
milvus grpc stub
-
def
calcDistance(left: Array[Array[Float]], right: Array[Array[Float]], params: Map[String, String]): CalcDistanceResults
- left
array of embeddings
- right
array of embeddings
- params
Map("metric" -> "IP", "dim" -> "256"))
- returns
CalcDistanceResults
-
lazy val
channel: ManagedChannel
gRPC channel
-
def
channelReady(requestConnection: Boolean = false): Boolean
check if channel is ready
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
- var config: Map[String, String]
-
def
createCollection: Status
- returns
-
def
createIndex: Status
- returns
-
def
createPartition(name: String): Status
- name
example "day_1_month_6_year_2022", generated based the day or week
- returns
-
def
delete(behaviors: List[Behavior]): MutationResult
- behaviors
List[Behavior]
- returns
MutationResult
- def delete(idsMap: Map[String, Array[Long]], time: Long): MutationResult
-
def
delete(deleteExpr: String, partitionName: String): MutationResult
- deleteExpr
id in [1,2,3...]
- partitionName
example "day_1_month_6_year_2022", generated based the day or week
- returns
MutationResult
-
def
describeCollection: DescribeCollectionResponse
- returns
DescribeCollection Response
-
def
describeIndex: DescribeIndexResponse
- returns
DescribeIndexResponse
-
def
dropCollection: Status
- returns
status of the response
-
def
dropIndex: Status
- returns
-
def
dropPartition(name: String): Status
- returns
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
flush(): FlushResponse
- returns
FlushResponse
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
getCollectionStatistics: GetCollectionStatisticsResponse
- returns
Will return collection statistics in stats field like [{key:"row_count",value:"1000"}]
-
def
getIndexState: GetIndexStateResponse
- returns
GetIndexStateResponse
-
def
getPartition(time: Long): String
get partition based on timestamp and partitioning strategy
get partition based on timestamp and partitioning strategy
- returns
example "day_1_month_6_year_2022", generated based the day or week
- def getPartitionStatistics(name: String): GetPartitionStatisticsResponse
-
def
hasCollection(): Boolean
- returns
true if a collection exist else false
-
def
hasPartition(name: String): Boolean
- returns
Boolean
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
initCollection: Status
- returns
-
def
insert(behaviors: List[Behavior]): Map[String, Array[Long]]
- behaviors
List[Behavior]
- returns
MutationResult
-
def
insert(rows: Int, embeddings: Array[Float], objectIds: Array[Long], sensorIds: Array[String], timestamps: Array[Long], end: Array[Long], partitionName: String): MutationResult
- rows
nunbers or records
- embeddings
flatten to Array[Float]
- objectIds
Array[Long]
- sensorIds
hashcode of sensorIds Array[Long]
- timestamps
timestamps in millis Array[Long]
- partitionName
example "day_1_month_6_year_2022", generated based the day or week
- returns
MutationResult
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
loadCollection: Status
- returns
-
def
loadPartitions(names: Seq[String]): Status
- names
example Seq("day_1_month_6_year_2022"), generated based the day or week
- returns
-
lazy val
log: Logger
init logger
init logger
- Annotations
- @transient()
- def main(arg: Array[String]): Unit
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
query(queryExpr: String, partitionNames: Seq[String]): QueryResults
- returns
QueryResults
-
def
queryCollection(expr: String, outputFields: Seq[String], partitionNames: Seq[String]): QueryResults
- expr
example "objectId == 100"
- outputFields
Seq("objectId","sensorId","timestamp")
- partitionNames
Seq("day_1_month_6_year_2022")
- returns
QueryResults
-
def
releaseCollection: Status
- returns
-
def
releasePartitions(names: Seq[String]): Status
- names
example Seq("day_1_month_6_year_2022"), generated based the day or week
- returns
-
def
resetCollection: Status
- returns
-
def
search(data: Array[Array[Float]], dsl: String, partitionNames: Seq[String], params: Map[String, String]): SearchResults
- data
Array of embeddings
- partitionNames
example Seq("day_1_month_6_year_2022"), generated based the day or week
- params
example Map("topk" -> "10", "metric_type" -> "IP", "anns_field" -> "embedding","params" -> "{\"nprobe\":10}")
- returns
SearchResults
-
def
showCollections: ShowCollectionsResponse
- returns
basic collection infos
- def showPartitions(): ShowPartitionsResponse
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
waitTillConnectionIsReady(): Unit
wait till connection is ready
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated