Try the LucidWorks Search query parser - it should handle this without
complaint, since an empty query can be omitted by the parser with no ill
effect. Solr and Lucene are simply being overly picky.
-- Jack Krupansky
-----Original Message-----
From: Shankar Sundararaju
Sent: Wednesday, June 12, 2013 1:18 PM
To: solr-user@lucene.apache.org
Subject: What is wrong with this blank query?
http://localhost:8983/solr/doc1/select?q=text:()&debugQuery=on&defType=lucene
I get this error:
org.apache.solr.search.SyntaxError: Cannot parse 'text:()': Encountered "
")" ") "" at line 1, column 6. Was expecting one of: <NOT> ... "+" ... "-"
... <BAREOPER> ... "(" ... "*" ... <QUOTED> ... <TERM> ... <PREFIXTERM> ...
<WILDTERM> ... <REGEXPTERM> ... "[" ... "{" ... <LPARAMS> ... <NUMBER> ...
<TERM> ... "*" ...
Why does lucene query parser support blank field? I know the work around is
-text:[* TO *]
But I like text:() as it is more logical. Is there any reason?
Thanks
-Shankar