pub struct QdrantStore { /* private fields */ }Expand description
VectorStore backed by Qdrant.
Implementations§
Source§impl QdrantStore
impl QdrantStore
pub fn new(config: QdrantConfig) -> Result<Self, RagError>
Trait Implementations§
Source§impl Clone for QdrantStore
impl Clone for QdrantStore
Source§impl Debug for QdrantStore
impl Debug for QdrantStore
Source§impl VectorStore for QdrantStore
impl VectorStore for QdrantStore
Source§fn upsert(
&self,
chunks: Vec<StoredChunk>,
) -> BoxFuture<'_, Result<(), RagError>>
fn upsert( &self, chunks: Vec<StoredChunk>, ) -> BoxFuture<'_, Result<(), RagError>>
Insert or replace chunks (by
id).Source§fn delete_document<'a>(
&'a self,
dataset_id: &'a str,
document_id: &'a str,
) -> BoxFuture<'a, Result<usize, RagError>>
fn delete_document<'a>( &'a self, dataset_id: &'a str, document_id: &'a str, ) -> BoxFuture<'a, Result<usize, RagError>>
Remove every chunk of a document. Returns the number removed when known.
Source§fn delete_dataset<'a>(
&'a self,
dataset_id: &'a str,
) -> BoxFuture<'a, Result<usize, RagError>>
fn delete_dataset<'a>( &'a self, dataset_id: &'a str, ) -> BoxFuture<'a, Result<usize, RagError>>
Remove every chunk of a dataset.
Source§fn document_chunks<'a>(
&'a self,
dataset_id: &'a str,
document_id: &'a str,
) -> BoxFuture<'a, Result<Vec<StoredChunk>, RagError>>
fn document_chunks<'a>( &'a self, dataset_id: &'a str, document_id: &'a str, ) -> BoxFuture<'a, Result<Vec<StoredChunk>, RagError>>
Every chunk of one document, vectors included. The ingestor uses this to
re-ingest a document without re-embedding unchanged chunks and to find the
chunks a new version no longer contains.
Source§fn delete_chunks<'a>(
&'a self,
dataset_id: &'a str,
ids: &'a [String],
) -> BoxFuture<'a, Result<usize, RagError>>
fn delete_chunks<'a>( &'a self, dataset_id: &'a str, ids: &'a [String], ) -> BoxFuture<'a, Result<usize, RagError>>
Remove chunks by id. Returns the number removed when known.
Source§fn search<'a>(
&'a self,
query: VectorQuery<'a>,
) -> BoxFuture<'a, Result<Vec<Hit>, RagError>>
fn search<'a>( &'a self, query: VectorQuery<'a>, ) -> BoxFuture<'a, Result<Vec<Hit>, RagError>>
Nearest neighbours by cosine similarity, best first.
Source§fn contains_hash<'a>(
&'a self,
dataset_id: &'a str,
content_hash: &'a str,
) -> BoxFuture<'a, Result<bool, RagError>>
fn contains_hash<'a>( &'a self, dataset_id: &'a str, content_hash: &'a str, ) -> BoxFuture<'a, Result<bool, RagError>>
Whether a chunk with this content hash already exists in the dataset.
Stores that cannot answer cheaply return
false. The built-in crate::Ingestor
does not use this (it de-duplicates per document via VectorStore::document_chunks).Source§fn list_documents<'a>(
&'a self,
dataset_id: &'a str,
limit: usize,
after: Option<&'a str>,
) -> BoxFuture<'a, Result<Vec<DocumentSummary>, RagError>>
fn list_documents<'a>( &'a self, dataset_id: &'a str, limit: usize, after: Option<&'a str>, ) -> BoxFuture<'a, Result<Vec<DocumentSummary>, RagError>>
Up to
limit documents of a dataset ordered by document id, starting after
after (a document id from the previous page). Stores that cannot list
return RagError::Unsupported.Source§fn supports_keyword(&self) -> bool
fn supports_keyword(&self) -> bool
Whether
VectorStore::keyword_search is implemented.Source§fn keyword_search<'a>(
&'a self,
query: KeywordQuery<'a>,
) -> BoxFuture<'a, Result<Vec<Hit>, RagError>>
fn keyword_search<'a>( &'a self, query: KeywordQuery<'a>, ) -> BoxFuture<'a, Result<Vec<Hit>, RagError>>
Keyword (BM25) search, best first. Stores without a keyword index return nothing.
Auto Trait Implementations§
impl !RefUnwindSafe for QdrantStore
impl !UnwindSafe for QdrantStore
impl Forget for QdrantStore
impl Freeze for QdrantStore
impl Move for QdrantStore
impl Send for QdrantStore
impl Sync for QdrantStore
impl Unpin for QdrantStore
impl UnsafeUnpin for QdrantStore
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