The complete BM25 engine for Python: production-scale, Rust-native
Project description
retrievalx
The complete BM25 engine for Python: all major BM25 variants, production-scale internals, Rust-native performance.
Highlights
- Rust core + PyO3 bindings, distributed as wheels.
- BM25 variants: Okapi, Plus, L, Adpt, F, T, Atire, Tf-Idf.
- Retrieval strategies: Exhaustive DAAT/TAAT, WAND, Block-Max WAND, MaxScore.
- Incremental updates with tombstones + explicit compaction.
- Persistence with binary snapshots, metadata sidecar, WAL replay, and mmap loading.
- Fusion utilities: RRF, linear combination, score normalization.
- Built-in BEIR benchmark, recall degradation report, and scoring variant comparison runner.
Quickstart
from retrievalx import BM25Index
index = BM25Index.from_documents([
"rust and python",
"information retrieval with bm25",
])
print(index.search("rust retrieval", top_k=5))
Real-world Examples
examples/it_ticket_search.pyexamples/legal_clause_discovery.pyexamples/ecommerce_query_tuning.pyexamples/security_log_hunt.pyexamples/wal_crash_recovery.pyexamples/multilingual_news_monitor.pyexamples/production_hybrid_reranking.pyexamples/benchmark_retrievalx_vs_rank_bm25.py
Build
./scripts/check_all.sh
Project Policies
- Contributing guide: CONTRIBUTING.md
- Security policy: SECURITY.md
- Support policy: SUPPORT.md
- Governance model: GOVERNANCE.md
- Release process: RELEASING.md
License
Apache-2.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
retrievalx-0.1.1.tar.gz
(58.1 kB
view details)
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 retrievalx-0.1.1.tar.gz.
File metadata
- Download URL: retrievalx-0.1.1.tar.gz
- Upload date:
- Size: 58.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1715bf291387617b0375efbb9487956fd61ce6d964060a7e261d6813d1b26ee
|
|
| MD5 |
6d5251310f653bf38780b7fefa449b83
|
|
| BLAKE2b-256 |
07ddeb34cc6cd297c9bc7b94aa6457a3706bc33eccab6edff6dccda6829069a6
|
File details
Details for the file retrievalx-0.1.1-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: retrievalx-0.1.1-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87169e2e78a452b6bbbaa293de6381af65b785d1dbb7ed59b4e5b75dedef7821
|
|
| MD5 |
45c65dfd5b04f0895f712c3c621cb938
|
|
| BLAKE2b-256 |
32821a7d35bf7ee3625eb90c7c89e8de2f1f5cb441fe9a64e7d37c2dd3569116
|