( ( ) ) may be valid Lucene, but it isn't valid as far as infixNotation is concerned. There have to be some operands in the string to be parsed, not just empty grouping ()'s. That is what that ParseException is trying to say. Your definition of term is just the parens around expression, which is unnecessary since infixNotation does this recursive part for you. Plus, you haven't defined just what a valid operand looks like. Reading your comments, a valid query string would look like ( (role:foo) ||...
contributor name spelling
Fixed ages ago
Exceptions when used under heavy load with ratpacking enbabled
Packrat cache has been completely rewritten
packrat caching can not be disabled
Packrat parsing has undergone major rewrite/improvements
Simplify code and support Python 3.5a0