alohadb_search
alohadb · AlohaDB search scoring, fuzzy matching and geographic search functions
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 102203 | alohadb_search | alohadb | 1.0 | FTS | MIT | C |
PostgreSQL · 18
Usage
Sources:
- README.md
- contrib/alohadb_search/alohadb_search–1.0.sql
- contrib/alohadb_search/search_bm25.c
- contrib/alohadb_search/search_suggest.c
- contrib/alohadb_search/meson.build
- contrib/alohadb_search/alohadb_search.control
alohadb_search 1.0 is an AlohaDB module for text relevance, fuzzy and phonetic matching, suggestions and geographic distance. The reviewed source belongs to AlohaDB, based on PostgreSQL 18; portability to a stock PostgreSQL installation is not established.
Core Workflow
Operational Boundaries
The module installs in public, is not relocatable and requires privileged installation. Its source defines no preload hook. search_bm25() scores a tsvector against a tsquery with optional k1 and b, using fixed corpus-size and average-length estimates in this revision; it is not a new index access method or a corpus-statistics engine. search_edit_distance() and search_fuzzy_match() compare strings; search_phonetic() computes a phonetic code. search_autocomplete() reads a supplied table/column; search_expand_synonyms() uses alohadb_search_synonyms, and search_analyze() exposes text analysis. search_haversine() returns meters, while search_nearby() queries a table within a radius. Only pass trusted table expressions to the dynamic-query helpers: the source interpolates the table argument into SQL. Review privileges and the implementation before production use.