Re: [PATCH] WIP: add thread subqueries.

Subject: Re: [PATCH] WIP: add thread subqueries.

Date: Thu, 07 Sep 2017 15:51:26 -0300

To: Gaute Hope, Jani Nikula, notmuch@notmuchmail.org

Cc:

From: David Bremner


Gaute Hope <eg@gaute.vetsj.com> writes:

> David Bremner writes on august 21, 2017 3:35:
>> David Bremner <david@tethera.net> writes:
>> 
>> 
>>> If you're interested in this feature, please test, let me know if it's
>>> workable for your use case.  The syntax here is thread:{$query}. The
>>> usual caveats about whitespace apply. The running example is
>>>
>>> 	     thread:{from:me} and thread:{from:jian} and not thread:{from:dave}
>>>
>> 
>> I was playing around with this, and
>> 
>>   'thread:"{from:bremner and date:2017}"' and thread:{from:sitaram}
>> 
>> is about 10x faster than without the date restriction. This is roughly
>> proportional to the number of threads matching the first subquery.
>> Unfortunately the date restriction needs to be inside the subquery with
>> the current design.
>
> So just to clarify; to make true full thread searches there cannot be
> more than one term in each thread:{} query? Otherwise, all terms in
> each thread: query must be found in at least one message at the same
> time. So you could put the date: restriction in a separate thread:{},
> but it would be slower?

I think your interpretation is correct. I would further emphasise the
following:

  - contrary to usual intuition with notmuch/xapian every extra
    thread:{} term will slow things down

  - having the date restriction in a seperate thread:{} term would ask
    for threads with at least one message in that date range

  - there might be many such threads; e.g. I have 34178 threads from
    2016

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

Thread: