unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* FastMail uses xapian for real time search, can we do the same?
@ 2016-03-24 10:40 Edward Betts
  2016-03-24 12:51 ` David Bremner
  0 siblings, 1 reply; 2+ messages in thread
From: Edward Betts @ 2016-03-24 10:40 UTC (permalink / raw)
  To: notmuch

I've tried using 'notmuch insert' with mutt-kz, the mutt fork that talks to
the notmuch database. Both keep trying to grab the write lock at the same time.

I tag a mail in mutt-kz and it writes the new tag to the database, at the same
time a new mail is coming in. Either 'notmuch insert' has the lock and
my mail client pauses while it retries or notmuch-insert isn't able to get the
write lock and just saves the mail to the maildir and it doesn't get added
until I later run 'notmuch new'.

I guess many people here are using the Emacs client and the problem is partly
avoided because there is a separate thread in the background trying to grab
the write lock and save tag changes. Is that correct?

I wonder if the solution is real time search? xapian can search in multiple
databases. New mails and tag changes can be written to a new database, there
could be one database for inserting new mails and another for changes to the
tags on existing mails. Then there are no problems with write locks. These
databases will be much smaller, so the writes should be faster. There can be a
process that runs once a day to merge the databases.

FastMail have implemented real time search for email with xapian.

Blog post: https://blog.fastmail.com/2014/12/01/email-search-system/

Implementation: https://github.com/brong/cyrus-imapd/tree/fastmail

Is there any enthusiasm for adding real time search to notmuch?
-- 
Edward.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: FastMail uses xapian for real time search, can we do the same?
  2016-03-24 10:40 FastMail uses xapian for real time search, can we do the same? Edward Betts
@ 2016-03-24 12:51 ` David Bremner
  0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2016-03-24 12:51 UTC (permalink / raw)
  To: Edward Betts, notmuch

Edward Betts <edward@4angle.com> writes:

>
> Is there any enthusiasm for adding real time search to notmuch?

It sounds interesting. I do wonder if just better (read, any) retry
handling might give most of the user benefits with fewer moving parts.

I think the real reason that the locking failures bother me less is just
a workflow one: I don't have notmuch-insert / notmuch-new running in the
background, but rather fetch a few few times a day. I'm not saying
everyone should read mail like I do, just explaining why it's less of a
priority for me personally than some other issues.

d

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-24 12:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-24 10:40 FastMail uses xapian for real time search, can we do the same? Edward Betts
2016-03-24 12:51 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).