On 11/7/2018 11:36 PM, nettadalet wrote:
Shawn Heisey-2 wrote
I do think that it is proper for empty parentheses to throw a syntax
error. The text of the exception message is saying that the parser
encountered the ) character at a point when it did not expect to
encounter that character.
A little further thought on this:
When using code to construct query strings, I think a situation can
easily arise where a query clause is optional, and the "()" string, with
or without whitespace between the parentheses, ends up in the generated
query.
I understand why the query parser complains about that syntax ... but I
don't think it would be unreasonable for Solr's query parsers (lucene
and edismax probably) to just handle it as if it were not there.
My bias would be to open an enhancement issue in Jira. I did some
searching and didn't find an existing issue, which is surprising. It
could be that there's an existing issue but I was not searching for the
right keywords. Before an issue is opened, I'd like to hear what the
community thinks.
Thanks,
Shawn