top | item 38799201

(no title)

junipertea | 2 years ago

How would you search through thousands of notes? Decrypt them all in memory, search and encrypt them again? How does this scale with attachments?

discuss

order

orthecreedence|2 years ago

Yeah, decrypt them all on startup and index them in-memory via SQLite. Regarding attachments, good question. Turtl doesn't index files.

apantel|2 years ago

I have a private note app that I wrote for personal notes to keep them off the cloud.

This is the one problem I don’t know how to go about solving for tens of thousands of notes.

If anyone has any solutions, please share.

rudasn|2 years ago

One simple way to get around this is to use some sort of labelling system for your notes.

Then you can hash the labels and keep an index of the hash. You can also symmetrically encrypt the hash, or slugify it first. The index can be a file, or many, that you load in memory and keep updated / synced on changes.

You can then do label-based searches on your notes by first hashing the input string and searching for an exact match in the index.

For something like full text search on encrypted data, I guess you'd need to use a database that already does that.

cyanydeez|2 years ago

is it possible you create a vector index on the open documents and that index basically has searchable value but doesn't leak anything vital? if it were just English you were searching for, then it wouldn't need encryption.

jitl|2 years ago

Seems fine to encrypt a SQLite database with all the contents