6 ms·
What do you mean, send your query off by email? Or search actual mails? How would they get them? Do you mean google mail?
by luxpsycho 14y ago
What do you mean, send your query off by email?
Or search actual mails? How would they get them? Do you mean google mail?
- Devilboy 14y agoIn Gmail you can search your own mail but whole words only. Searching for PROPEL will not bring up an email containing the word PROPELLER for example.
- enf 14y agoThe reason you can only search for whole words is that it's straightforward to build an inverted index for whole words, but it takes dramatically more storage to make an index to search for arbitrary substrings, since there are exponentially many substrings of each string, most of which you would never want to search for.
- Devilboy 14y agoMy old desktop-based email reader could do it though. I definitely feel like I lost something here. Even just a KEYWORD* search would be an improvement, and that does not require a bigger index.
- bdonlan 14y agoMost likely it was just doing an unindexed search over the whole thing. This works, but requires a significant amount of resources - both CPU time and IOPS - for people with large amounts of email. It's also slow unless you have only a small amount of email or it's all in memory already. So it's not really feasible for a free, shared service that offers multiple gigabytes of storage space.
- thisrod 14y agoThere's a data structure to solve this problem: the length 3 string. Google "trigram". Russ Cox has even indexed regexp searches this way.