News for hackers. Stuff that matters.
Re:Offline First by dadior on Wednesday September 29, 2021 @06:51AM (#28692135)
Offline first is a dream to me, I build a big note-taking app (midinote.me) which is 100% offline, but now the biggest pain point is the full text search, yes, we can use DB like this and PouchDB to store data, but currently, there isn't a good solution for full text search in javascript, I tried lunr.js the performance is poor, and researched FTS by sqlite, it don't support Chinese, I ever considered pack the lucene (on JVM) with Electron.js( the desktop wrap on JS) on desktop, I'm not sure it is a good idea, now I am going to re-think all these things, and considering give up offline and switch to server side full text search, it will save huge effort comparing to client-side search!
Re:Offline First by 727564797069706 on Wednesday September 29, 2021 @06:55AM (#28692159)
Kudos on building offline first software!

Just spitballing here: maybe there’s a way to use Redis (and RediSearch) compiled to WebAssembly and then use it on client side?

Re:Offline First by dadior on Thursday September 30, 2021 @04:18AM (#28704198)
Thanks, this solution might be better than mine, it don't need JVM
Re:Offline First by hunterb123 on Wednesday September 29, 2021 @02:10PM (#28697615)
Re:Offline First by dadior on Thursday September 30, 2021 @04:10AM (#28704159)
Yes, I used it, generally, on JS platform, the performance is not so good to do FTS, especially when document is long and the data getting huge.
Re:Offline First by knubie on Wednesday September 29, 2021 @09:21AM (#28693194)
I’m in the same boat with my app. Have you tried Elasticlunr? It claims to be significantly faster than Lunr.
Re:Offline First by dadior on Thursday September 30, 2021 @04:13AM (#28704181)
I ever researched this lib, I haven't any data to support my opinion, but I don't have too much confidence on it. Also, this repo didn't update for a while.
Re:Offline First by dadior on Wednesday September 29, 2021 @06:55AM (#28692158)
Yes, I am on javascript stack, maybe using other language client side FTS is easier? I don't know