cryptee / web-client

Cryptee's web client source code for all platforms.
https://crypt.ee
Other
444 stars 22 forks source link

[Feature Request] Client side search #154

Closed arturolinares closed 2 years ago

arturolinares commented 2 years ago

Is your feature request related to a problem? Please describe. Tags are great, but they don't replace full text search.

Describe the solution you'd like Full text search that works on the client side (browser). Using the same technology used to search static sites, lunr, allows a user to search for text privately.

Additional context I know it has been discussed before, but full-text search is very important for digital documents. Maybe giving the user the option to select the folders to index can mitigate the problem of having too much data to parse and index. Lunrjs seems like a good compromise between search capabilities and privacy, because everything happens in the frontend.

I can imagine the following workflow:

  1. Using the folder contextual menu, add an option to toggle the search index on its content
  2. After enabling it, a progress bar over the total storage available in the sidebar, shows the indexing progress and disappears when completed.
  3. If the indexing takes more than ~1 min, shows an error, mentioning the folder is too big.
johnozbay commented 2 years ago

Hey Arturo 👋🏻 Thanks for filing this! I already talked about why this is mathematically impossible in #86 — 

TLDR; downloading, decrypting and indexing 2TB (heck even 400gb or 10gb) on client-side is downright mathematically impossible. (and it's about to get even more impossible, as we're about to raise the file-size limits)

But to answer your 3rd question — almost all paid users would get errors, as downloading, decrypting and indexing even 10GB (not to mention 400gb or 2TB) would almost always take more than 10+ mins.

i.e. Proton shipped full body text search doing client side indexing and search, and even with something like 4gb - 5gb of emails (and each email has to be under 25mb ~ which is not the case in Cryptee, files can be massive) it takes up to 30 mins

Closing this one, as it's a duplicate of #86, and we can continue the conversation there, but basically unless companies start shipping phones with larger memories and storage, this isn't mathematically possible to accomplish on a client-side encrypted platform like Cryptee, and it's a compromise we'll have to accept and choose according to our own threat models, balanced between convenience, privacy and security.