Useful scenarios with Canned Search for Confluence

Introduction


This is a collection of some useful examples that Canned Search for Confluence for your users.

Scenarios


View blog posts created in the last 5 days within this space and sorted by creation date

You can list the blog posts created in the previous 5 days in chronological order (oldest first)

type = blogpost AND created > startOfDay("-5d") order by created asc

Execute search only for meeting minutes/requirements/How-to  

The following CQL will only search for Meeting Minutes containing the given search text. Meeting Minutes are pages with Title containing Minutes or labelled with minutes.

text ~ $$query$$ AND (label = minutes OR title ~ Minutes )

You can also search all the children and descendants pages under the Requirements section by using the ancestor field.

The id of the id of the root page can be found by clicking on the Page Information link



The link of the information page is generated in the url (e.g. it is 11829250 for https://akeles.jira.com/wiki/pages/viewinfo.action?pageId=11829250)

ancestor = 11829250 AND text ~ $$query$$

Pages within "project" spaces

There are a few ways

  1. If you know the list of spaces in advance, you can provide them as a list

    space in ("Project A", "Project B", "Project C") AND text ~ $$query$$
  2. Alternatively, if your space follows a naming convention, you can select those spaces by their title. The example below assumes all the project space will contains "Project" in their space name.

    space.title ~ Project AND text ~ $$query$$

Comments which I was mentioned in, and are updated this week

You can find out comments  that you are "mentioned" last week

type = comment AND lastmodified > startOfWeek() AND lastmodified < endOfWeek() AND mention = currentUser()

Other Tips


You can create a "Canned Search Page" in your Confluence with a list of canned search macros added for your users to do power searching

References