platform-search
Platform-wide hybrid search: pgvector + FTS with Reciprocal Rank Fusion (ADR-087)
Overview
Combines PostgreSQL pgvector semantic search with full-text search (FTS), merged via Reciprocal Rank Fusion (RRF). Optional MMR diversity filter and temporal decay scoring.
Installation
pip install -e packages/platform-search
Usage
from platform_search.service import SearchService
results = SearchService.search(
query="Gefährdungsbeurteilung Arbeitsplatz",
tenant_id="abc-123",
source_types=["assessment"],
top_k=10,
)
Configuration
# config/settings/base.py
PLATFORM_SEARCH = {
"EMBEDDING_PROVIDER": "openai",
"EMBEDDING_MODEL": "text-embedding-3-small",
"EMBEDDING_DIMENSIONS": 1536,
"VECTOR_WEIGHT": 0.6,
"TEXT_WEIGHT": 0.4,
"RRF_K": 60,
"DEFAULT_TOP_K": 10,
}
Requires OPENAI_API_KEY in Django settings (ADR-045).
Database
Migration creates search_chunks table in content_store DB (ADR-062).
Run: python manage.py migrate platform_search --database=content_store
Related ADRs
- ADR-087: Hybrid Search Architecture
- ADR-062: Content Store
- ADR-045: Secret Management
- ADR-072: Schema Isolation (Row-Level deviation documented)
Metadata
Release files for iil-platform-search 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| iil_platform_search-0.1.0.tar.gz | 8.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| iil_platform_search-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.1 kB
Release files / iil_platform_search-0.1.0.tar.gz
| Download URL | iil_platform_search-0.1.0.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75331297ab62c74212f7d23f480eacdd252fb2bc357cc6d741607dc6d3998f56
|
|
BLAKE2b-256 checksum How to use checksums |
f5562b056d69768605fc1c1d565108f27064d8c58495a402c12fe5584ff5f7dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / iil_platform_search-0.1.0-py3-none-any.whl
| Download URL | iil_platform_search-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c725a521b5647659d6d994ada38b619d0ea661baf345157b042e20866be92a3c
|
|
BLAKE2b-256 checksum How to use checksums |
b380d0c2fd4631652c51ef2ea2f9b2e89cb1c26d4589bd13142ea8381415e4c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Security for iil-platform-search 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.