pub struct MilvusVectorStore<M> { /* private fields */ }Expand description
Represents a vector store implementation using Milvus - https://milvus.io/ as the backend.
Implementations§
Source§impl<M> MilvusVectorStore<M>where
M: EmbeddingModel,
impl<M> MilvusVectorStore<M>where
M: EmbeddingModel,
Sourcepub fn new(
model: M,
base_url: String,
database_name: String,
collection_name: String,
) -> Self
pub fn new( model: M, base_url: String, database_name: String, collection_name: String, ) -> Self
Creates a new instance of MilvusVectorStore.
§Arguments
model- Embedding model instancebase_url- The URL of where your Milvus instance is located. Alternatively if you’re using the Milvus offering provided by Zilliz, your cluster endpoint.database_name- The name of your databasecollection_name- The name of your collection
Trait Implementations§
Source§impl<Model> InsertDocuments for MilvusVectorStore<Model>
impl<Model> InsertDocuments for MilvusVectorStore<Model>
Source§impl<M> VectorStoreIndex for MilvusVectorStore<M>where
M: EmbeddingModel,
impl<M> VectorStoreIndex for MilvusVectorStore<M>where
M: EmbeddingModel,
Source§async fn top_n<T: for<'a> Deserialize<'a> + Send>(
&self,
req: VectorSearchRequest<Filter>,
) -> Result<Vec<(f64, String, T)>, VectorStoreError>
async fn top_n<T: for<'a> Deserialize<'a> + Send>( &self, req: VectorSearchRequest<Filter>, ) -> Result<Vec<(f64, String, T)>, VectorStoreError>
Search for the top n nearest neighbors to the given query within the Milvus vector store.
Returns a vector of tuples containing the score, ID, and payload of the nearest neighbors.
Source§async fn top_n_ids(
&self,
req: VectorSearchRequest<Filter>,
) -> Result<Vec<(f64, String)>, VectorStoreError>
async fn top_n_ids( &self, req: VectorSearchRequest<Filter>, ) -> Result<Vec<(f64, String)>, VectorStoreError>
Search for the top n nearest neighbors to the given query within the Milvus vector store.
Returns a vector of tuples containing the score and ID of the nearest neighbors.
Source§impl<M> VectorStoreIndexDyn for MilvusVectorStore<M>
impl<M> VectorStoreIndexDyn for MilvusVectorStore<M>
Source§fn top_n_ids<'a>(
&'a self,
req: VectorSearchRequest<CoreFilter<Value>>,
) -> WasmBoxedFuture<'a, Result<Vec<(f64, String)>, VectorStoreError>>
fn top_n_ids<'a>( &'a self, req: VectorSearchRequest<CoreFilter<Value>>, ) -> WasmBoxedFuture<'a, Result<Vec<(f64, String)>, VectorStoreError>>
Implement the top_n_ids method of the VectorStoreIndex trait for MongoDbVectorIndex.
Source§fn top_n<'a>(
&'a self,
req: VectorSearchRequest<CoreFilter<Value>>,
) -> WasmBoxedFuture<'a, TopNResults>
fn top_n<'a>( &'a self, req: VectorSearchRequest<CoreFilter<Value>>, ) -> WasmBoxedFuture<'a, TopNResults>
Returns the top N documents for a JSON-serializable request.
Auto Trait Implementations§
impl<M> !RefUnwindSafe for MilvusVectorStore<M>
impl<M> !UnwindSafe for MilvusVectorStore<M>
impl<M> Freeze for MilvusVectorStore<M>where
M: Freeze,
impl<M> Send for MilvusVectorStore<M>where
M: Send,
impl<M> Sync for MilvusVectorStore<M>where
M: Sync,
impl<M> Unpin for MilvusVectorStore<M>where
M: Unpin,
impl<M> UnsafeUnpin for MilvusVectorStore<M>where
M: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more