Add fuzzy matching to ParadeDB search
Make ParadeDB search typo-tolerant via configurable fuzzy distance and document the new setting. Add coverage for fuzzy query SQL and id parsing, and keep integration test stability under connection load.
This commit is contained in:
parent
74da3e01f7
commit
7efd296afb
6 changed files with 79 additions and 7 deletions
|
|
@ -160,7 +160,8 @@ To use it, set the search module to `Pleroma.Search.ParadeDB` and configure the
|
|||
>
|
||||
> config :pleroma, Pleroma.Search.ParadeDB,
|
||||
> url: System.get_env("PARADEDB_DATABASE_URL") || "postgres://postgres:postgres@127.0.0.1:5432/paradedb",
|
||||
> table: "pleroma_search_documents"
|
||||
> table: "pleroma_search_documents",
|
||||
> fuzzy_distance: 0
|
||||
|
||||
Then, create the table and BM25 index once:
|
||||
|
||||
|
|
@ -178,4 +179,6 @@ After that, run an initial indexing pass to backfill existing posts:
|
|||
|
||||
Note: Like the other external search backends, only public/unlisted Notes are indexed.
|
||||
|
||||
Set `fuzzy_distance` to `1` or `2` to allow typo-tolerant matching (`2` is the maximum ParadeDB supports).
|
||||
|
||||
Indexing runs via the Oban `search_indexing` queue, so ensure that queue is enabled (not paused) in your Oban configuration.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue