[HN Gopher] Real-Time Full-Text Site Search with SQLite FTS5 ext...
___________________________________________________________________
Real-Time Full-Text Site Search with SQLite FTS5 extension
Author : marcobambini
Score : 27 points
Date : 2023-05-17 14:03 UTC (8 hours ago)
(HTM) web link (blog.sqlitecloud.io)
(TXT) w3m dump (blog.sqlitecloud.io)
| psanford wrote:
| I'm a big fan of FTS5 as a cheap/easy way of adding full text
| search to datasets.
|
| Recently I've been storing these datasets in S3 and been querying
| them directly via a VFS[0]. Its a simple way to have FTS
| available to lambda functions without the cost of using an online
| database.
|
| [0]: https://github.com/psanford/sqlite3vfshttp
| fmajid wrote:
| I use it for my blog's search function:
|
| https://github.com/fazalmajid/fts5index
|
| Their default syntax is not great, so I wrote a converter from
| Google syntax to theirs.
| meghan_rain wrote:
| > sqlite cloud
|
| lmao
| mbreese wrote:
| I get it, but seriously trying to wrap my head around it. But
| their example code took me a minute.
|
| And their demo code looks like: #include
| "sqlite3.h" #ifdef USE_LOCAL_DATABASE
| #define DATABASE "/var/databases/invoice.sqlite" #else
| #define DATABASE
| "sqlitecloud://username@password:localhost/invoice.sqlite"
| #endif int main (int argc, char
| **argv) { sqlite3 *db; rc =
| sqlite3_open(DATABASE, &db); }
|
| It took me a while to figure out they they are trying to
| replace the sqlite3.h file with a patched version that includes
| handling their own remote protocol.
|
| They (in theory) provide:
|
| _> SQLite Cloud provides an open-source C library that is 100%
| source code compatible(1) with SQLite (based on our official
| SQLiteCloud C SDK)._
|
| Why not ship a sqlite3_cloud.h file? You're already using a
| conditional macro anyway. I assume you could also swap this
| version in when compiling something like Python, but the
| friction for a company to use this is really high. Especially
| when SQLite is _designed_ for a protocol-less, local,
| experience. I think the fly.io method of moving an
| application+sqlite3 database both to the same cloud node is
| probably the better choice.
|
| Or, it might be possible to do something with SQLite's virtual
| FS module to keep it all vanilla SQLite and still store the
| full database remotely.
___________________________________________________________________
(page generated 2023-05-17 23:01 UTC)