-
Notifications
You must be signed in to change notification settings - Fork 0
Fuzzy search #13
Copy link
Copy link
Open
Labels
dbinvolves the database, tables, or reprinvolves the database, tables, or reprfilteringsearch/sort functionalitysearch/sort functionality
Metadata
Metadata
Assignees
Labels
dbinvolves the database, tables, or reprinvolves the database, tables, or reprfilteringsearch/sort functionalitysearch/sort functionality
Type
Fields
Give feedbackNo fields configured for Feature.
I'd like for the literal search functionality (
CollectionModifier::Literal) to use fuzzy searching if at all possible.There's an extension to do that within the
sqleanSQLite extension collection located here. However, SQLx doesn't compile extensions for you.So, we need to add
libsqlite3-syswithout default features. Then, in ourbuild.rsbuild script, we should compile SQLite and the extension, then emit [env]SQLITE3_STATIC=1and [env]SQLITE3_LIB_DIR="<target dir...>/sqlite3/build/or whatever.If it's possible, we may be able to dynamically patch SQLite with the extension (at build time), then happily ask
libsqlite3-systo build it for us with [env]SQLITE3_INCLUDE_DIR. I'd prefer this, as building stuff manually is always some dirty business. :pA fork might work too, as SQLite is well-known for stability, and in general, there's really not much security concern within this project. I
Here are some references:
sqlx::sqlitedocs: explains a little about howsqlxrelies onlibsqlite3-sysrustqlite3-sysREADME - Notes on Building: review of the build process for the Rust bindingssqlxGitHub Issues - "SQLite: Is there a way to load extensions?": info about how to load extensions dynamically, and some discussion about PR #2062 (which adds dynamic extension support in the connection settings)