MilvusStorage
BaseVectorStorage for interacting with
Milvus, a cloud-native vector search engine.
The detailed information about Milvus is available at:
Milvus <https://milvus.io/docs/overview.md/>_
Parameters:
- vector_dim (int): The dimension of storing vectors.
- url_and_api_key (Tuple[str, str]): Tuple containing the URL and API key for connecting to a remote Milvus instance. URL maps to Milvus uri concept, typically “endpoint:port”. API key maps to Milvus token concept, for self-hosted it’s “username:pwd”, for Zilliz Cloud (fully-managed Milvus) it’s API Key.
- collection_name (Optional[str], optional): Name for the collection in the Milvus. If not provided, set it to the current time with iso format. (default: :obj:
None) **kwargs (Any): Additional keyword arguments for initializingMilvusClient.
init
_create_client
- url_and_api_key (Tuple[str, str]): The URL and API key for the Milvus server. **kwargs: Additional keyword arguments passed to the Milvus client.
_check_and_create_collection
_create_collection
- collection_name (str): Name of the collection to be created. **kwargs (Any): Additional keyword arguments pass to create collection.
_delete_collection
- collection (str): Name of the collection to be deleted.
_collection_exists
- collection_name (str): The name of the collection to check.
_generate_collection_name
_get_collection_info
- collection_name (str): Name of the collection to be checked.
_validate_and_convert_vectors
- records (List[VectorRecord]): List of vector records to validate and convert.
add
- records (List[VectorRecord]): List of vectors to be added. **kwargs (Any): Additional keyword arguments pass to insert.
delete
- ids (List[str]): List of unique identifiers for the vectors to be deleted. **kwargs (Any): Additional keyword arguments passed to delete.
status
query
- query (VectorDBQuery): The query object containing the search vector and the number of top similar vectors to retrieve. **kwargs (Any): Additional keyword arguments passed to search.