[Xapian-tickets] [Xapian] #794: delimiter/raw-string support for FieldProcessors

Xapian nobody at xapian.org
Fri Aug 30 21:27:50 BST 2019


#794: delimiter/raw-string support for FieldProcessors
--------------------------------+------------------
        Reporter:  bremner      |      Owner:  olly
            Type:  enhancement  |     Status:  new
        Priority:  normal       |  Milestone:
       Component:  Other        |    Version:
        Severity:  normal       |   Keywords:
      Blocked By:               |   Blocking:
Operating System:  All          |
--------------------------------+------------------
 notmuch uses FieldProcessors to support a optional regex syntax.

 subject:/^foo.*/

 and

 subject:"foo bar"

 are both valid but the latter is a regular phrase search.

 This works by taking the string passed to field processor and parsing it
 recursively with the given default prefix.

 thread:{} is a similar syntax provided via field processors.

 Currently the "" are removed before passing the string into the field
 processor, which means the field process has to guess (e.g. by looking for
 spaces) if phrase parsing is intended. This guessing can be wrong, e.g. in
 the case of wildcards.

 It would be nice if there was a way to know if the string passed in was
 originally quoted.

 I guess the other related issue is that it feels a bit hacky to trigger
 phrase parsing by adding double quotes to the front and back of the
 string, but I'm not sure if that's worth worrying about.

 Currently users have to quote both field:/foo bar/ and field:{foo bar}
 queries to avoid the foo and bar being split apart. It would be nice if we
 could define new or extra delimiter pairs. Currently notmuch does not
 support escaping of these fake delimiters, so foo:/blah/blurg/ is one
 regex with a / in the middle.

--
Ticket URL: <https://trac.xapian.org/ticket/794>
Xapian <https://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list