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
|
|
@ -940,7 +940,8 @@ config :pleroma, Pleroma.Search.Meilisearch,
|
|||
|
||||
config :pleroma, Pleroma.Search.ParadeDB,
|
||||
url: nil,
|
||||
table: "pleroma_search_documents"
|
||||
table: "pleroma_search_documents",
|
||||
fuzzy_distance: 0
|
||||
|
||||
config :pleroma, Pleroma.Search.ParadeDB.Repo,
|
||||
pool_size: 10,
|
||||
|
|
|
|||
|
|
@ -3560,6 +3560,12 @@ config :pleroma, :config_description, [
|
|||
type: :string,
|
||||
description: "Table name used for search documents.",
|
||||
suggestion: ["pleroma_search_documents"]
|
||||
},
|
||||
%{
|
||||
key: :fuzzy_distance,
|
||||
type: :integer,
|
||||
description: "Edit-distance used for fuzzy token matching (0 disables fuzziness, max 2).",
|
||||
suggestion: [0, 1, 2]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue