Details
-
Bug
-
Resolution: Unresolved
-
High
-
Minor
-
1
Description
Issue Summary
When using CQL that searches over a large number of space, the REST search endpoint can return a 500 error. This is caused by the CQL being interpolated into a Lucene query that gets sent to the back end service, and the query exceeds the 2048 term limit.
Steps to Reproduce
- Do a CQL search with
/wiki/rest/api/content/search?cql=type = 'space' and space in spacesWithCreatePermission(<permission>)
Expected Results
The endpoint returns with the expected data.
Actual Results
The below exception is thrown
"statusCode": 500, "message": "com.atlassian.confluence.api.service.exceptions.SSStatusCodeException: CQL was parsed but the search manager was unable to execute the search. Error message: com.atlassian.confluence.api.service.exceptions.SSStatusCodeException: There was an error returned from XP-Search Aggregator API: HTTP/1.1 500 Internal Server Error"
Workaround
Re-write the CQL to not use spacesWithCreatePermission.