From: Gaute Hope <eg@gaute.vetsj.com>
To: Tomi Ollila <tomi.ollila@iki.fi>,
David Bremner <david@tethera.net>,
Austin Clements <aclements@csail.mit.edu>
Cc: notmuch <notmuch@notmuchmail.org>
Subject: Re: [PATCH] WIP: regexp matching in 'subject' and 'from'
Date: Sat, 11 Jun 2016 17:34:18 +0000 [thread overview]
Message-ID: <1465666155-astroid-5-8srklogp6e-1296@strange> (raw)
In-Reply-To: <m2a8iry7nb.fsf@guru.guru-group.fi>
Tomi Ollila writes on juni 11, 2016 19:09:
> On Sat, Jun 11 2016, Gaute Hope <eg@gaute.vetsj.com> wrote:
>> Maybe we could check if the search string contains a regexp and decide
>> whether to pre-process it on the background of that? I think that would
>> make the interface more user-friendly. You'd just always use search
>> whether you decide that you need to put in some regexp or not.
>
> You probably wanted to suggest that the command line handling in notmuch
> goes through the search terms and potentially modify it before giving
> to xapian to chew for... I think this is deliberately avoided (*) -- this
> would get out of hands so easily (if we could decide syntax)...
>
> (*) there is some optmization done before feeding the query to xapian --
> but that does not affect interface (i.e. it could be dropped and none of
> the users' expectations would be broken...)
>
> What one can do, is write ones own wrapper around notmuch. I have one
> that was written long before notmuch got date: searches (it mangles
> e.g 5h.. to 1234567890.. (**) and logs search and show queries
> (**) should change that to use date:... instead (i.e. date: queries w/o
> date: prefix). I "suggested" subject:/one's own subject re search w// slashes/
> which one could pretty easily write to the wrapper...
>
Yes, that is pretty much what I meant. So that the user only needs
to know about 'search:', if it is 'search:foo' regular queryparser is
used, if it is 'search:/^foo/' it is preprocessed using the regexp
parser. Then the performance will remain the same for normal queries,
but seamlessly switch to the heavier regexp'er if necessary.
It could be done with a wrapper, but I am mainly using notmuch through
the API and astroid - where it could also be implemented of course.
-gaute
next prev parent reply other threads:[~2016-06-11 17:34 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 6:58 searching: '*analysis' vs 'reanalysis' Gaute Hope
2016-06-06 12:42 ` David Bremner
2016-06-06 12:53 ` Gaute Hope
2016-06-06 15:52 ` Sebastian Fischmeister
2016-06-06 17:29 ` David Bremner
2016-06-06 19:20 ` Austin Clements
2016-06-06 20:08 ` Gaute Hope
2016-06-06 20:22 ` Austin Clements
2016-06-07 2:05 ` [PATCH] WIP: regexp matching in subjects David Bremner
2016-06-07 10:16 ` David Bremner
2016-06-10 2:28 ` [PATCH] WIP: regexp matching in 'subject' and 'from' David Bremner
2016-06-10 2:42 ` David Bremner
2016-06-10 11:11 ` Tomi Ollila
2016-06-10 11:50 ` David Bremner
2016-06-10 8:38 ` Gaute Hope
2016-06-10 11:09 ` David Bremner
2016-06-11 16:32 ` Gaute Hope
2016-06-11 16:49 ` David Bremner
2016-06-11 17:09 ` Tomi Ollila
2016-06-11 17:34 ` Gaute Hope [this message]
2016-06-11 1:49 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1465666155-astroid-5-8srklogp6e-1296@strange \
--to=eg@gaute.vetsj.com \
--cc=aclements@csail.mit.edu \
--cc=david@tethera.net \
--cc=notmuch@notmuchmail.org \
--cc=tomi.ollila@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).