Re: Using Xapian synonyms with notmuch

2019-05-31 Thread David Bremner
Xu Wang  writes:

>
> xu:$ notmuch config set query.james "from:james or from:jimmy or from:jaime"
> xu:$ notmuch search "from:james" | wc -l
> 79
> xu:$ notmuch search "from:james or from:jimmy or from:jaime" | wc -l
> 91
> xu:$ notmuch search james | wc -l
> 177
>
> I was hoping above quantities would be the same, so I think I did
> something wrong.

That's not how saved queries work. You need to search for "query:james"
not "from:james".
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: Using Xapian synonyms with notmuch

2019-05-30 Thread David Bremner
Xu Wang  writes:

> I have some contacts who go by several names (mostly people who use
> their native name in addition to sometimes using a name easier to
> pronounce for others; but also some secret agents). I often want to do
> something like "from:James" and where notmuch gives me back results
> with emails from "James", "Jimmy" and from "Jaime".
>

I think the only solution that is possible with current notmuch is to
use a stored query

$ notmuch config set query.james "from:James or from:Jimmy or from Jaime"
$ notmuch search query:james and date:today

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Using Xapian synonyms with notmuch

2019-05-30 Thread Xu Wang
I have some contacts who go by several names (mostly people who use
their native name in addition to sometimes using a name easier to
pronounce for others; but also some secret agents). I often want to do
something like "from:James" and where notmuch gives me back results
with emails from "James", "Jimmy" and from "Jaime".

I have done searching and found some relevant threads:

https://notmuchmail.org/pipermail/notmuch/2013/015571.html
https://xapian.org/docs/synonyms.html
https://getting-started-with-xapian.readthedocs.io/en/latest/howtos/synonyms.html

However, they are very technical for me. It is not possible to just
put something in .notmuch-config that specifies synonyms so that
notmuch will build the Xapian database with those aliases?

By the way, I don't know Xapian at all or how to call it manually. I
have very simple .notmuch-config and I don't have any deep
understanding or programming experience.

Kind regards,

Xu
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch