Support server-side search
The current client-side search is a bit of a hack. It's a brute-force search back through history, so is O(n) and uses O(n) network requests. (And network traffic, if you haven't got a cached copy of the Items locally.)
SQLite actually supports full text search indexes! Could add an option to enable it, and let servers advertise that they support server-side search, at which point clients can use that.
Use cases:
All
- Sort by search relevance
- Allow users to choose which users' posts to search
Search My (a) Feed
-
A user is viewing their feed in the UI.
-
Enters a search term in the search filter.
-
That UI calls the server-side search to find items that match.
-
Order by search relevance
-
Only show things in the user's feed. (option to tell server which user's feed to search? Though maybe this is too much a specialization and it should just accept a list of userIDs to search?)
Server Search
- Just search "all" users on a server.
- Should we have a way for users to opt into/out of being globally searchable on servers?
- Possibly limit it to servers that their profile claims to be hosted on?
- What are the defaults?
- A way for server admins to further limit what's globally searchable/discoverable?
See also: #11