Issue
If you are running an SQL2 query in CRX 2.2 you may encounter the following exception:
org.apache.lucene.search.BooleanQuery$TooManyClauses: maxClauseCount is set to 1024
Running the query through the CRXDE Lite query window, or using QueryManager.createQuery will result in this error.
Reason
This error occurs if you are using the ISDESCENDANTNODE clause in your SQL2 query and there are too many child nodes in the result set. It is a bug in jackrabbit-core which is part of CRX 2.2.
https://issues.apache.org/jira/browse/JCR-3247
Solution
This issue will be solved in future releases of CQ 5.5 and CRX.
Workaround
The workaround for this issue is to split your SQL2 query into multiple queries to reduce the result set for each query, and then you can consolidate the results afterwards.
reference: (32103)
