Skip to main content
Skip table of contents

Useful CQLs

For more information, visit Advanced Searching Using CQL


Find content within the current space

CODE
text ~ $$query$$ and space = $$space.key$$  

Find content by title within the current space

CODE
title ~ $$query$$ and space = $$space.key$$  

Find content that has mentioned the current user

CODE
text ~ $$query$$ and mention = currentUser()

Find content in the current space that mentions the given user

SQL
space = $$space.key$$ and mention = $$query$$

Find page that is favourited by the current user

CODE
favorite = currentUser() and type = page

Find content that are contributed by the given user since past week

SQL
contributor = $$query$$ and lastModified > startOfWeek("-1w") and type not in (comment,attachment) order by type desc
  • For this to work, please set the Search Type to Exact Match

Find content that has the CQL navigation macro

SQL
macro = cqlnavigation order by title asc
Click to display other macro name

Macro Display Name

Macro name

CQL Search

cqlsearch

CQL Search Table

cqlsearchtable

CQL Search Counter (Board)

cqlsearchcounter

CQL Search Counter (Link)

cqlsearchcounterlink

CQL Navigation

cqlnavigation

Contributor Summary Report

cqlsummary

Two Dimensional Contributor Report

cqlsummaryreport

CQL Quick Search

cqltab

Display pages within the current space that do not have any label

SQL
sitesearch ~ "type:page AND NOT (labelText:[a TO z] OR labelText:[0 TO 9]) AND spacekey:$$space.key$$"

Appendix A - List of Placeholder variables

Placeholder

Description

$$space.key$$

The key of the current space

$$space.title$$

The title of the current space

$$id$$

The id of the current page

$$parentid$$

The key of the parent page

$$title$$

The title of the current page

$$created$$

The created date of the current page

$$lastmodified$$

The last modified date of the current page

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.