Hacker News new | ask | show | jobs
by rom-antics 1204 days ago
> discord has a search feature, but it’s pretty awful

Their search makes me want to pull my hair out.

Why can't I just search the history with grep? That's a feature I would pay for (if anyone at Discord is reading this and wants my $10/month)

2 comments

I'd be happy even if they just didn't hijack Command/Ctrl-F. You can't even search for text on the screen you're viewing without being dumped into their shitful pseudosearch.
Microsoft GitHub does this nonsense too stealing add-ons' and native `/` for quick search even when you disable the it in their settings
Massive pet peeve of mine too.
Because it would be obscenely expensive (in terms of computational resources) to search history via grep. Hence why we use an inverted index.
This is megabytes (at most) of text we're talking about, not gigabytes. And ripgrep is absurdly fast. Grepping a 5MB text file should be pretty much instantaneous.
Do you know of any service that is running at scale out there that stores their data as 5mb plain text files?
The “text files” don’t have to be the primary backing store - merely a derived cache file that can be periodically refreshed with new content. It doesn’t have to be text either - SQLite is pretty structured if you need more features in a minimal container too.