Skip to content
Joshua Thijssen edited this page Aug 6, 2020 · 1 revision

Searching messages is an important part of the user experience. There are two ways to use search: remote or local.

Local search is the easiest. We can download messages, index them in an inverted index, and use it for search. This means we need to download ALL messages before we are able to search them. We aren't able to have a mobile app where we can search messages offline, and only download the messages we need.

Remote search is not possible: as we do not have the private key to decrypt the messages (nor do we want to).

A hybrid solution might be possible:

  • we store (encrypted) inverted index remote.
  • whenever we download a message on a (search-capable) client, we extract the message info, index it, and send a new inverted-index block over.
  • we can check for new blocks on the server. Download them and add them to our local inverted index. We can decrypt the information from that block locally, so the local inverted index actually contains the correct info.
  • because we do not want to have too many inverted index blocks, we probably want to merge blocks once in a while.
Clone this wiki locally