An obvious question that I didn't hit on in the blog is "what about host crashes"? The nice thing is, every index knows exactly which messages it covers - and we can quite quickly (within an hour or so for an entire server) scan all mailboxes and index the missing messages - it's more efficient than doing it in a real time, because you are often indexing multiple messages in the same mailbox. Once the indexes are up…
FastMail's Email Search Architecture
11–20 of 32 posts
Re: FastMail's Email Search Architecture
#12Earlier quoted context omitted.
For me it would be the use of Java. I've just had too much bad luck with it. Admittedly that's not really very objective reasoning.
From memory (sorry, it was a while back) we actually started with Elasticsearch, but it was way to heavy and looked for an alternative solution. Even with a single user it was consuming way too much memory.
We use Elasticsearch elsewhere (ELK stack), but not for mail search.
Re: FastMail's Email Search Architecture
#13Although in the past I've implemented Xapian [1] over Sphinx [2], Sphinx today seems to be much better, but both Xapian and Sphinx are under-appreciated compared to Solr [3] and Elasticsearch [4]. [1] http://xapian.org/ [2] http://sphinxsearch.com/ [3] http://lucene.apache.org/solr/ [4] http://www.elasticsearch.org/
With sphinx, we found we had to start and stop daemons all over the place to manage memory, and it was just unworkable. It was either that or run one big index per machine, but there are operational reasons I'd rather not be doing that. We try to keep everything user-sized.
That said, there's still stub Sphinx code in there. Both engines are have GPL licensing on them, which means compiling against Cyrus (BSD licensed) causes a non-BSD licensed end result. Not an issue for us, since we publish all our Cyrus code anyway.
There is talk of building an Elasticsearch backed into Cyrus as well - feel free, it's all open source. We'd definitely take the patch if it's good code (he says with his Cyrus Project Board Member hat on rather than his FastMail Director hat on)
Re: FastMail's Email Search Architecture
#14If you want Xapian search on a local maildir, I highly recommend notmuch[1]. Adding new mail and updating the index can take noticable time, but searching is super fast, it allows easy custom tagging, and search results are better than gmail in my experience. I use it from the emacs notmuch mode. [1] http://notmuchmail.org/
http://www.djcbsoftware.nl/code/mu/ http://www.djcbsoftware.nl/code/mu/mu4e.html
Re: FastMail's Email Search Architecture
#15If you want Xapian search on a local maildir, I highly recommend notmuch[1]. Adding new mail and updating the index can take noticable time, but searching is super fast, it allows easy custom tagging, and search results are better than gmail in my experience. I use it from the emacs notmuch mode. [1] http://notmuchmail.org/
Re: FastMail's Email Search Architecture
#16If you want Xapian search on a local maildir, I highly recommend notmuch[1]. Adding new mail and updating the index can take noticable time, but searching is super fast, it allows easy custom tagging, and search results are better than gmail in my experience. I use it from the emacs notmuch mode. [1] http://notmuchmail.org/
Can notmuch do regular expression searches?
Re: FastMail's Email Search Architecture
#17Re: FastMail's Email Search Architecture
#18Although in the past I've implemented Xapian [1] over Sphinx [2], Sphinx today seems to be much better, but both Xapian and Sphinx are under-appreciated compared to Solr [3] and Elasticsearch [4]. [1] http://xapian.org/ [2] http://sphinxsearch.com/ [3] http://lucene.apache.org/solr/ [4] http://www.elasticsearch.org/
All of those last three are awesome if you either put all the user's search indexes into a single engine, or have a shit-ton of memory. With sphinx, we found we had to start and stop daemons all over the place to manage memory, and it was just unworkable. It was either that or run one big index per machine, but there are operational reasons I'd rather not be doing that. We try to keep everything user-sized. That said…
Solr (well, Lucene) has awesome natural language stemming abilities, many more languages supported than Xapian. In particular it's much smarter than Xapian about Chinese. But a) the memory requirement makes running multiple shards on the same machine hard, and b) nobody in the company wanted to learn how to handle Java operationally.
EDIT: since 2012 Sphinx appear to have made a public mirror of their internal tree at https://code.google.com/p/sphinxsearch/source/checkout
Re: FastMail's Email Search Architecture
#19If you want Xapian search on a local maildir, I highly recommend notmuch[1]. Adding new mail and updating the index can take noticable time, but searching is super fast, it allows easy custom tagging, and search results are better than gmail in my experience. I use it from the emacs notmuch mode. [1] http://notmuchmail.org/
But I don't use emacs, and that seems to lead to subpar support and crazy hacks to get something up and working, unfortunately.
Re: FastMail's Email Search Architecture
#20If you want Xapian search on a local maildir, I highly recommend notmuch[1]. Adding new mail and updating the index can take noticable time, but searching is super fast, it allows easy custom tagging, and search results are better than gmail in my experience. I use it from the emacs notmuch mode. [1] http://notmuchmail.org/
I'm always a bit jealous when I see this setup (or mu). But I don't use emacs, and that seems to lead to subpar support and crazy hacks to get something up and working, unfortunately.
Me neither, but mutt-kz had built-in support for notmuch. Not the hacky kind that calls 'notmuch', but it actually links against libnotmuch.