You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »


The following modules are powered by CQL: News, Activity, Search and Pages

Sites and categories introduced by RefinedTheme can be used in a CQL statement. 

KeyTypeDescriptionExample query
refinedSitenumberThe site id. You can find the site Id in the Site Builder. Click edit on a site and take the site id from the url.refinedSite = 123
refinedCategorystringThe category key.refinedCategory = hr

RefinedTheme 6.1

CQL function()DescriptionExample
blogs()Returns all spaceKeys for spaces marked as 'Blog spaces'
type = blogpost AND space IN blogs()
blogSite()Returns all spaceKeys for spaces placed in the Blog Site
type = blogpost AND space IN blogSite()





Atlassian CQL documentation

Read this document to learn more about CQL: https://developer.atlassian.com/server/confluence/advanced-searching-using-cql/


Examples

Display the user's favorite pages. See example below under the "my favourite pages' section. 

favorite = currentUser() and type = page

Get all blog posts from a site.

type = blogpost AND refinedSite = 123 ORDER BY created DESC


Get all blog posts from a category.

type = blogpost AND refinedCategory = hr ORDER BY created DESC


List all my mentions

siteSearch ~ "$username*" and mention = currentUser()


Get all blog posts added by the current logged in user. 

Tip: Text Variables can be used to construct CQL queries. 

type = blogpost AND creator = $username ORDER BY created DESC

Get all blogposts from the blog site.

type = blogpost AND space IN blogSite() ORDER BY created DESC


Get all blogposts from blog spaces

type = blogpost AND space IN blogs() ORDER BY created DESC

You can also make use of any third-party CQL additions as well (RefinedTheme 6.1).


Search Confluence Questions for questions or answers (RefinedTheme 6.1)

type = "com.atlassian.confluence.plugins.confluence-questions:answer" or type = "com.atlassian.confluence.plugins.confluence-questions:question"


Search all content using the CQL: text ~"*$query*". 

type = "text ~"*$query*"


Search Confluence for users

siteSearch ~ "$query*" and type = user


Search my mentions

siteSearch ~ "$query*" and mention = currentUser()


Do a complete content search within a space using the CQL:

text ~"*$query*" and space.key=$spacekey


  • No labels