Heads up! ScriptRunner documentation is moving to docs.adaptavist.com. Adaptavist will keep this site up for a bit, but no future updates to documentation will be published here. ScriptRunner 6.20.0 will be the last release to link to scriptrunner.adaptavist.com for in-app help.

When you’re in a Confluence instance, you can perform an advanced Confluence Query Language (CQL) search to look for specific things in the Confluence instance.

To navigate to the search, follow these steps:

  1. Click in the search bar at the top right of the screen.

  2. Select Advanced Search at the bottom of the left navigation.

    advanced search navigation
  3. Select Advanced CQL Search to the right of the search bar.

    This is a toggle between Basic Search and Advanced CQL Search.

    advanced cql search


Advanced CQL searches are made up of three parts:

  • Field (examples: space, creator, lastModified)

  • Operator (like = or !=)

  • Value/Function (what you want to search for)

field = "value"

To search for a specific label in your Confluence instances, use the field label followed by the operator = followed by a value test to search for the test label.

advanced cql search example

You can combine CQL statements for more advanced searches using AND and OR.

field = "value" AND field = "value"

Use the previous example of label = "test" followed by an operator of AND to search for a second statement to search for a label of users, label = "users".

advanced cql search example 2

You can use the order of operations to search for multiple CQL statements.

*(field = "value" *AND field = "value") OR (*field = "value")*

Building off the previous example, I also want to search for spaces with the title "Development Notes," but I don’t need that space to have the labels of "test" and "users."

advanced cql search 3
For more information, visit Advanced Searching Using CQL and Performing Text Searches Using CQL Atlassian documentation.

Have questions? Visit the Atlassian Community to connect, share, and learn with other Atlassian users and experts, including Adaptavist staff.

Ask a question about ScriptRunner for JIRA, Bitbucket Server, or Confluence.

Want to learn more? Check out courses on Adaptavist Learn, an online platform to onboard and train new users for Atlassian solutions.