DEV Community

Discussion on: Making a full-text search module that works on both desktop and mobile (Pt. 1)

Collapse
 
z0al profile image
z0al

Great article Takuya. Thank you so much. I had this post bookmarked for a few years because I knew one day I will need it :)

I have a few questions:

So, the conclusion is to go with FTS4. But if possible, it would be better to switch to FTS5.

  1. Did you end up going with fts4 or fts5 at the end?
  2. Do you use contentless or contentful (external content) table?
  3. If you used contentless tables with fts4. How do you workaround deleting records?
  4. if you used external content tables. How much more space does it (approximately) take compared to the original size (without FTS)?
Collapse
 
craftzdog profile image
Takuya Matsuyama

I ended up only using FTS5 because I managed to update the SQLite version on Android: github.com/craftzdog/react-native-...
I use neither contentless nor contentful because the actual content is stored in PouchDB. Since they are just text notes, the size wouldn't matter.

Collapse
 
z0al profile image
z0al

Thank you for your reply

I use neither contentless nor contentful because the actual content is stored in PouchDB

I'm a bit confused. I thought that's what contentless tables were about?

Contentless FTS4 Tables: In order to create an FTS4 table that does not store a copy of the indexed documents at all, the content option should be set to an empty string.

From the SQLite docs