Search Confluence with CQL

To search Confluence with CQL in Capable Search, open a search and select Switch to CQL in the filter bar, then type your query. The field suggests fields, operators and values as you type and flags mistakes in red. Build filter chips first if you prefer: the field then starts with the CQL they made.


#Before you start

You need

Why

Capable Search installed

The app is part of Capable Search for Confluence and the Capable Suite.

Access to the pages you want to find

Search only returns pages you can already open.


#Steps

  1. Open Capable Search: select Capable Search in the space sidebar or the Apps menu (in the Suite, Capable, then Search).

  2. Select New search, or open a saved search to start from.

  3. Add filters with Select filters if you want a starting point.

  4. Select Switch to CQL, the code button beside the column picker.

  5. Type your query, for example space = "DOCS" AND lastmodified >= now("-30d"). Pick suggestions from the list as they appear.

  6. If the field turns red, read the list under it and fix each problem. The results update to match your query.

  7. To sort, add ORDER BY at the end, for example ORDER BY lastmodified DESC.


#If it does not work

  • A query that starts with a wildcard, such as title ~ "*plan", matches nothing. Confluence does not support it.

  • Confluence rejected this query. means Confluence itself refused it. Check quotes and brackets.

  • A Capable field that returns nothing may not be indexed yet. See A search returns nothing.



Write it once, run it whenever.