mistralai-search-toolkit-plugins-qdrant
Qdrant backend for mistralai-search-toolkit.
Implements VectorStoreIndex, plus optional NavigableIndex and PatchableIndex.
Install
uv add mistralai-search-toolkit-plugins-qdrant
docker run -p 6333:6333 qdrant/qdrant
Usage
from mistralai.search.toolkit.embedding import CustomEmbeddingModel
from mistralai.search.toolkit.plugins.qdrant import (
QdrantApp,
QdrantCollectionSchema,
QdrantConnectionConfig,
)
from mistralai.search.toolkit.search import VectorSearchQuery
schema = QdrantCollectionSchema(
collection_name="docs",
document_type=MyDoc,
embedding_model=CustomEmbeddingModel(name="my-embedder", dimensions=1024),
)
app = QdrantApp([schema])
config = QdrantConnectionConfig(url="http://localhost:6333")
await app.create_collection(config, "docs")
store = app.get_search_index(config, "docs")
try:
await store.index_document(doc)
results = await store.search(VectorSearchQuery(embedding=vec, top_k=10))
finally:
await store.aclose()
Pass an AsyncQdrantClient instead of a config to own the client. For tests:
QdrantConnectionConfig(path=":memory:")
One Qdrant point per chunk.
- Dense search. Reindex upserts, then drops stale points. Honors
exclude_idsandmax_candidates(hnsw_ef). - Hybrid search. A query with both
embeddingandqueryfuses dense ranking with full-text overcontentvia weighted RRF. Tune withQdrantSearchQuery. Fusionscoreis comparable only within one result set.distancecomes from the dense side; lexical-only hits havedistance=None. - Navigation uses
[start, end)offsets.grepis token-based:PHRASEordered,TERMany order. patch_chunk/patch_documentmerge metadata key by key.Noneremoves a key.
Custom chunk fields keep their name. Document fields get a document_ prefix.
from typing import Annotated
from mistralai.search.toolkit.plugins.qdrant import QdrantField
section: Annotated[str | None, QdrantField(name="section_title")] = None
internal: Annotated[str | None, QdrantField(ignore=True)] = None
Qdrant point ids are integers or UUIDs. Default UUID5 chunk ids pass through. Other ids map through uuid5; the original stays in payload id.
uv sync --group dev
uv run pytest tests/ -q
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mistralai_search_toolkit_plugins_qdrant-0.1.0.tar.gz.
File metadata
- Download URL: mistralai_search_toolkit_plugins_qdrant-0.1.0.tar.gz
- Upload date:
- Size: 98.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2a9dd38876b4ed9e329e11055172e22a0451e542f02414794bc406a57f62a75
|
|
| MD5 |
2b14bdfea4fbab28d98df19138e709da
|
|
| BLAKE2b-256 |
b900e02002cc0884c9b7bbd43e425cb1d0b926b7978106e57c8b930e199a027e
|
File details
Details for the file mistralai_search_toolkit_plugins_qdrant-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mistralai_search_toolkit_plugins_qdrant-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f73f0c792d4e4394adeb19b35179d5264d92c8f97259a062ebdf8bb17bb9272e
|
|
| MD5 |
e86f26e26a72c3aa6daa1a19840b662c
|
|
| BLAKE2b-256 |
198fb4619ef8a78e493b702d5540b165d90a77fc64a14a99ce451e5426894a76
|