Re: [PATCH 4/5] nmbug-status: Wrap query phrases in parentheses when and-ing together

2015-12-31 Thread W. Trevor King
On Wed, Dec 30, 2015 at 11:16:59AM -0800, W. Trevor King wrote: > @@ -167,7 +167,8 @@ class Page (object): > view['title'], sort_key)) > if 'query-string' not in view: > query = view['query'] > -view['query-string'] = ' and '.join(query) > +

[PATCH 4/5] nmbug-status: Wrap query phrases in parentheses when and-ing together

2015-12-30 Thread W. Trevor King
For example: "query": ["tag:a", "tag:b or tag:c"] is now converted to: ( tag:a ) and ( tag:b or tag:c ) instead of the old: tag:a and tag:b or tag:c This helps us avoid confusion due to Xapian's higher-precedence AND [1], where the old query would be interpreted as: ( tag:a and tag:b