Skip to main content

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.py
  • examples/legal_clause_discovery.py
  • examples/ecommerce_query_tuning.py
  • examples/security_log_hunt.py
  • examples/wal_crash_recovery.py
  • examples/multilingual_news_monitor.py
  • examples/production_hybrid_reranking.py
  • examples/benchmark_retrievalx_vs_rank_bm25.py

Build

./scripts/check_all.sh

Project Policies

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.3.tar.gz (58.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

retrievalx-0.1.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.7 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

retrievalx-0.1.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.7 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

retrievalx-0.1.3-cp39-abi3-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.9+Windows x86-64

retrievalx-0.1.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.7 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

retrievalx-0.1.3-cp39-abi3-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

retrievalx-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

retrievalx-0.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file retrievalx-0.1.3.tar.gz.

File metadata

  • Download URL: retrievalx-0.1.3.tar.gz
  • Upload date:
  • Size: 58.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for retrievalx-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ee9ea2333e29022fe2e7b89d7d33b842277d8308d80de1f3e987050ea0243b9b
MD5 77358817b09b7908dff7d8e34b850a39
BLAKE2b-256 975c09afeb149a0d0a465447980a2dd05c3d72a29d8adac755e1bcb2e1eb28ab

See more details on using hashes here.

File details

Details for the file retrievalx-0.1.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for retrievalx-0.1.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5785ccba83a54768593e80a6a2ccda0b09e65fd13ec3b1d8c80e6eeb5c1e6c2e
MD5 549974f95b7d55cabf69449727b16e10
BLAKE2b-256 57dd98538bbc6863ceb093ee259eb432c635dfcde3f446a25dcb47e661cacaa8

See more details on using hashes here.

File details

Details for the file retrievalx-0.1.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for retrievalx-0.1.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 251079deb70fd6c8e10efcb99be3b96251ad934266e135a94ee7abaf2188aa0a
MD5 c5956dce7158c6c095c774fa3329ca3c
BLAKE2b-256 c55dffde9d989780fc97b42552f79b37c4abaa6206c4513a68fdec55f6329325

See more details on using hashes here.

File details

Details for the file retrievalx-0.1.3-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: retrievalx-0.1.3-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for retrievalx-0.1.3-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 44acfceef1d56f0ab5456aaf350d5d187049252d93e2938dcebd5bd2f078d2c4
MD5 a628865000552297b87f610cd342c0e4
BLAKE2b-256 f028003505621104f908d4e1cf3c0a40b960ef6fcfacea615b11a087d5e1fc05

See more details on using hashes here.

File details

Details for the file retrievalx-0.1.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for retrievalx-0.1.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 eb63114be989657336a089477d2f8660124ddbbb737e41ea983144a5e4f97ed2
MD5 8a35c77ac1ba7d7576afd1b2820d0669
BLAKE2b-256 070188fd913ab568629d652b71af32a87ee327dcc69b644d9d01bad6ed8c6a16

See more details on using hashes here.

File details

Details for the file retrievalx-0.1.3-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for retrievalx-0.1.3-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 34aed7c4f721008b290c911a1f256ba826efdeefe194238b14567c8f5c974a66
MD5 6698136d0ee1e782ce8b023858780c46
BLAKE2b-256 8d39ca54a95c0c1627e08f4dbf8283ad325c1d01eb6885aed4324978ac02cbf7

See more details on using hashes here.

File details

Details for the file retrievalx-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for retrievalx-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 363caf4f94edac5d80e3946811663938b85e364317ae224f4852611b05429d9b
MD5 78fbb6ff6ccf1f755de20121b0d7747c
BLAKE2b-256 3b36ec6b5ca1e591ded4df7dd05f61677e67d315077e420f484ebb6f825d9cbc

See more details on using hashes here.

File details

Details for the file retrievalx-0.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for retrievalx-0.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 69092d3d459944df1093ddd3378af19fd4c2781ca0b02eff27de4ca462575d72
MD5 6d02a45291be7cd64d7439a87a0d73cd
BLAKE2b-256 61d94b963033abf94eb582fe532ae221cfd178c790e46e729dcf0d946e43967a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page