Platform-wide hybrid search: pgvector + FTS with Reciprocal Rank Fusion (ADR-087)
Project description
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)
Project details
Release history Release notifications | RSS feed
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 iil_platform_search-0.1.0.tar.gz.
File metadata
- Download URL: iil_platform_search-0.1.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75331297ab62c74212f7d23f480eacdd252fb2bc357cc6d741607dc6d3998f56
|
|
| MD5 |
12e14d360dec3a943dedef4ea22a1aa4
|
|
| BLAKE2b-256 |
f5562b056d69768605fc1c1d565108f27064d8c58495a402c12fe5584ff5f7dc
|
File details
Details for the file iil_platform_search-0.1.0-py3-none-any.whl.
File metadata
- Download URL: iil_platform_search-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c725a521b5647659d6d994ada38b619d0ea661baf345157b042e20866be92a3c
|
|
| MD5 |
725f75bb027de5f500d92159f7fd7f9d
|
|
| BLAKE2b-256 |
b380d0c2fd4631652c51ef2ea2f9b2e89cb1c26d4589bd13142ea8381415e4c8
|