QueryParser: do not try to parse unbroken words as group terms
commit624207c1e1d98336ab037486d5251ed5c3aa103c
authorRobert Stepanek <rsto@fastmailteam.com>
Thu, 25 Jan 2024 11:57:21 +0000 (25 12:57 +0100)
committerOlly Betts <olly@survex.com>
Thu, 7 Mar 2024 04:08:49 +0000 (7 17:08 +1300)
tree2b55d0aabcbb0cd715aad91179adfd627c4eea55
parent90ed0e3153cdd145fe0831c73c1a0c7d74cb7e9c
QueryParser: do not try to parse unbroken words as group terms

Fixes a bug where QueryParser fails with an error when parsing
the sequence of: term, whitespace, unbroken words, term. The
underlying issue is that unbroken words can not be part of a
group according to the lemon grammar.

As the combination of unbroken words and terms is highly unlikely
to ever form a multi-term synonym, this patch changes the query
parser to leave group term mode after having parsed unbroken words.

Fixes #331
xapian-core/queryparser/queryparser.lemony
xapian-core/tests/api_queryparser.cc