Skip to main content

4 min read

Supercharge your Confluence searches with ScriptRunner

Supercharge your Confluence searches with ScriptRunner
alert2 Icon
PLEASE NOTE
The content of this blog is no longer updated

Supercharge your Confluence searches with ScriptRunner

For a good reason, Confluence has become synonymous with collaboration. From sharing knowledge and ideas to managing projects and roadmaps, Confluence has it all.

Confluence has many great features, including giving you the ability to create, share and store your content all in one place. In this post, we’ll cover how to optimize your search capabilities in Confluence, to access and retrieve the content you need quickly and easily.

Finding the content you need in Confluence

With the volume of data continuing to soar and with the introduction of new laws like GDPR (General Data Protection Regulation) enterprises are under increasing pressure to control their data and access it with ease when they need to. Locating the right data fast is not just a nice-to-have anymore, it’s critical.

If your team have worked hard to create lots of great content in Confluence they need to be able to leverage, share and repurpose this rich content with minimal effort.

Check out our blog detailing three simple ways teams can create compelling content.

With Confluence’s out-of-the-box search feature, you can search across all pages and instances. The challenge users face with this feature is that it works well for basic search functions, but is not so robust for complex search queries.

This is largely down to Confluence’s classification of data, which relies heavily on users creating content with the right name, in the right location and with the right labels. Another challenge teams face is that there are very few ways to enforce standards, making misclassification and in some cases non-classification impossible to avoid sometimes. 

Confluence however, has a very nifty search feature baked into it that most people have never heard of Confluence Query Language (CQL), allows you to search in Confluence using a wide set of parameters, like searching by content author and with a specific label. This is, in many ways, similar to Jira’s Query Language (JQL). The reason that most teams haven’t heard about CQL is that, unlike JQL, there is no easy way to access the search feature.

Step forward, ScriptRunner for Confluence. This powerful app empowers teams and individual content creators to tap into the full potential of CQL, by providing an easy-to-use search bar, adding the flexibility to define your own search parameters and providing the ability to display your search results permanently in a page. 

How ScriptRunner for Confluence works

ScriptRunner for Confluence provides you with access to CQL through a simple button:

 1Confluence

Once you’ve swapped over to the advanced CQL search, you can simply start typing your search terms. In the image below we’re looking for all content in the ‘ds’ space.

2confluence

ScriptRunner for Confluence also provides access to CQL via a macro. With this macro, you can display results based on a CQL query. This feature is particularly useful when you want to view search results on a more permanent basis. 

3confluence

To find out what you fields you can search for in CQL, take a look at Atlassian’s CQL reference documentation.

Going a Step Further

For most straightforward use cases Atlassian’s CQL fields are sufficient. However, power-users might find they don’t provide everything that they require. 

Imagine if you wanted to view all pages in Confluence that are linked to a specific page. This action is not currently possible using Confluence’s out-of-the-box CQL functionality or its search capabilities. However, with ScriptRunner for Confluence, you can execute even more complex search queries by creating your own custom script CQL functions, including:

  • Searching for pages watched by a specific user that were created in a specific date
  • Searching for pages viewed recently that contain a certain label
  • Searching for pages created by a certain user that contain attachments bigger than x megabytes

To create a script CQL Function, just navigate to the link in the left in the admin section:

4confluence

In the Script CQL Function menu you can create your own bespoke CQL function. Take a look at Adaptavist’s documentation on this topic to find out more. 

5confluence

Start discovering more of your content today

In an era where content is growing at an unprecedented rate and customer expectations continue to rise, enterprises need to be able to access, respond and act on their content quickly and efficiently to make better, more informed decisions. 

By helping you to tap into the wealth of content you have created through its powerful search capabilities, ScriptRunner for Confluence can equip you with the right insights and knowledge you need, when you need it.

Try ScriptRunner for Confluence today!

copy_text Icon
Copied!