[PATCH 2/2] lib: do not phrase parse prefixed bracketed subexpressions

2022-02-24 Thread David Bremner
Since Xapian does not preserve quotes when passing the subquery to a field processor, we have to make a guess as to what the user intended. Here the added assumption is that a string surrounded by parens is not intended to be a phrase. --- doc/man7/notmuch-search-terms.rst | 6 -- lib/regexp-

[PATCH 1/2] test: known broken tests for bracketed terms in subject

2022-02-24 Thread David Bremner
The heuristics in the field processor currently incorrectly trigger phrase parsing. --- test/T650-regexp-query.sh | 18 ++ 1 file changed, 18 insertions(+) diff --git a/test/T650-regexp-query.sh b/test/T650-regexp-query.sh index 55dc6c88..4ee6b171 100755 --- a/test/T650-regexp-que

fix for parsing bracketed expression

2022-02-24 Thread David Bremner
This is not a complete fix, which is hard because of the way we implement regular expressions. Sean's original examples still won't work, but hopefully the tests in the second patch show how to make something similar work. This is probably a good time to mention that this kind of thing is easier in