Details
Description
The following edgecase combinations result in an error:
1) An empty set of parenteses anywhere outside of a phrase search. Example- hello world ()
Error:
Unable to process query
Solr Returned: org.apache.lucene.queryParser.ParseException: Cannot parse '((title_short:(hello world ())^750 OR title_full:(hello world ())^400 OR title:(hello world ())^300 OR title:(hello world ())^250 OR title_alt:(hello world ())^200 OR title_new:(hello world ())^100)^50 OR series:(hello world ())^50 OR series2:(hello world ())^30 OR author:(hello world ())^300 OR author:(hello world ())^250 OR author2:(hello world ())^50 OR author_additional:(hello world ())^50 OR contents:(hello world ())^10 OR topic:(hello world ())^500 OR geographic:(hello world ())^300 OR genre:(hello world ())^300 OR allfields:(hello world ()))': Encountered " ")" ") "" at line 1, column 28. Was expecting one of: <NOT> ... "+" ... "-" ... "(" ... "*" ... <QUOTED> ... <TERM> ... <PREFIXTERM> ... <WILDTERM> ... "[" ... "{" ... <NUMBER> ... <TERM> ... "*" ...
2) Combination of a colon (anywhere) with a set of parentheses (empty or not empty). Example- hello : (world)
Error:
Unable to process query
Solr Returned: undefined field hello
RequestURI=/solr/biblio/select/
1) An empty set of parenteses anywhere outside of a phrase search. Example- hello world ()
Error:
Unable to process query
Solr Returned: org.apache.lucene.queryParser.ParseException: Cannot parse '((title_short:(hello world ())^750 OR title_full:(hello world ())^400 OR title:(hello world ())^300 OR title:(hello world ())^250 OR title_alt:(hello world ())^200 OR title_new:(hello world ())^100)^50 OR series:(hello world ())^50 OR series2:(hello world ())^30 OR author:(hello world ())^300 OR author:(hello world ())^250 OR author2:(hello world ())^50 OR author_additional:(hello world ())^50 OR contents:(hello world ())^10 OR topic:(hello world ())^500 OR geographic:(hello world ())^300 OR genre:(hello world ())^300 OR allfields:(hello world ()))': Encountered " ")" ") "" at line 1, column 28. Was expecting one of: <NOT> ... "+" ... "-" ... "(" ... "*" ... <QUOTED> ... <TERM> ... <PREFIXTERM> ... <WILDTERM> ... "[" ... "{" ... <NUMBER> ... <TERM> ... "*" ...
2) Combination of a colon (anywhere) with a set of parentheses (empty or not empty). Example- hello : (world)
Error:
Unable to process query
Solr Returned: undefined field hello
RequestURI=/solr/biblio/select/
Issue Links
| This issue incorporates: | ||||
| VUFIND-125 | Improved validation of searches with boolean operators |
|
|
|
For us at least this is unfortunately common as students get sloppy in doing a copy/paste from course material and miss one of the quotes.
In particular the advanced (ie. non DisMax) searches are more trouble. Perhaps it's something that needs to update during search parsing/tokenisation?
Worth upgrading to Major too.