Closed KyleMaas closed 3 years ago
@arj03 Best way I can think of to implement this would be to pull the last X messages and search their content with indexOf(). Is there a better way to do this in db2 other than the brute force approach?
There was an index thing that looked really nice. Let me just find that.
This one. See this thread on ssb: %4NrjfBaWS/YuKjR6bU+wbqR9mGhnBKy73LXO1gJeOE8=.sha256
Hm. Looks like meilisearch requires a server instance. But I think the basic principle could work. I'll see what I can find.
Thinking maybe FlexSearch might be a good one to use:
https://github.com/nextapps-de/flexsearch
Either that or MiniSearch (which is under an MIT license instead of Apache):
https://github.com/lucaong/minisearch
If we only indexed only the last few thousand posts, I could see this working pretty quickly.
It would awfully nice if we could do searches for posts by a keyword. When I was looking for information on the nonstandard way to include a post title in #67, it took me quite a while to find the SSB messages which talked about that. I forgot to file this at the time, but it would have been really handy if I could have searched for that using terms I knew were part of that conversation. I think Patchwork supports searching like this. We should, too.