agrag.vectordb.qdrant.QdrantVectorStore
QdrantVectorStore(*, settings:QdrantSettings | None = None, tracer:Tracer | None = None) -> None
Bases: VectorStore
An exclusive vector index on Qdrant 1.17 or newer.
BM25 inference runs locally through FastEmbed, not Qdrant Cloud. Hybrid queries use weighted reciprocal rank fusion. Dense scores have graph-native scale; hybrid scores are ranks only. Searches accept at most 16384 results.
Parameters:
- settings (
QdrantSettings | None) – Connection settings and the required per-graph prefix. - tracer (
Tracer | None) – Opens spans without recording credentials or embedded text.
Functions:
- close – Release connections; a later initialize can reconnect.
- collection_info – Return count and dense configuration, or None when absent.
- collection_name – Return the prefixed collection name for a kind.
- delete – Delete in batches of 256 and wait for the changes to become visible.
- delete_collection – Remove a collection; an absent collection is already deleted.
- ensure_collection – Create both vector indexes or reject a mismatched existing index.
- hybrid_search – Fuse dense and BM25 ranks; alpha endpoints select one leg exactly.
- initialize – Connect once, authenticate and check that the server is reachable.
- list_ids – Page ascending UUIDs, excluding the cursor even if it still exists.
- search – Return dense hits on the graph-native score scale.
- upsert – Overwrite records, waiting for each dense and BM25 batch to be applied.
Attributes:
- collection_prefix –
- max_results –
- name (
str) –
close
close() -> None
Release connections; a later initialize can reconnect.
collection_info
collection_info(kind:VectorKind, *, exact_count:bool = True) -> CollectionInfo | None
Return count and dense configuration, or None when absent.
Parameters:
- kind (
VectorKind) – The collection to describe. - exact_count (
bool) – Scan the collection for an exact count. When false, the count is the server's estimate from collection metadata.
collection_name
collection_name(kind:VectorKind) -> str
Return the prefixed collection name for a kind.
collection_prefix
collection_prefix = self._settings.collection_prefix
delete
delete(kind:VectorKind, ids:Sequence[UUID]) -> None
Delete in batches of 256 and wait for the changes to become visible.
delete_collection
delete_collection(kind:VectorKind) -> None
Remove a collection; an absent collection is already deleted.
ensure_collection
ensure_collection(kind:VectorKind, *, dimensions:int, distance:Distance) -> None
Create both vector indexes or reject a mismatched existing index.
hybrid_search
hybrid_search(kind:VectorKind, vector:Sequence[float], text:str, *, limit:int, alpha:float, labels:Sequence[str] | None = None) -> list[VectorHit]
Fuse dense and BM25 ranks; alpha endpoints select one leg exactly.
initialize
initialize() -> None
Connect once, authenticate and check that the server is reachable.
list_ids
list_ids(kind:VectorKind, *, after:UUID | None = None, limit:int = 1000) -> list[UUID]
Page ascending UUIDs, excluding the cursor even if it still exists.
A limit of zero returns no IDs; a negative limit raises ValueError.
max_results
max_results = MAX_SEARCH_LIMIT
name
name: str = 'qdrant'
search
search(kind:VectorKind, vector:Sequence[float], *, limit:int, labels:Sequence[str] | None = None) -> list[VectorHit]
Return dense hits on the graph-native score scale.
upsert
upsert(kind:VectorKind, records:Sequence[VectorRecord], *, batch_size:int = 256) -> None
Overwrite records, waiting for each dense and BM25 batch to be applied.