can I search for pages that do not have a certain label?

James Strangeway
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 10, 2015

This question is in reference to Atlassian Documentation: Confluence Search Syntax

Ask your question here...

2 answers

1 accepted

2 votes
Answer accepted
Stephen Deutsch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 11, 2015

I tested this search:

type:page NOT labelText:confluence

and it appeared to return all pages not containing the label "confluence".  I tested on both Cloud and Server.

The only thing you have to be careful about are hyphenated labels (i.e. confluence-doc), because a search will match both "confluence" and "doc".

James Strangeway
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 13, 2015

Thanks!!!!

1 vote
RPT Admin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 10, 2015

I'm not aware of any way you can do this. We employ a workaround in my organisation, where all pages must have a default label. You can then use the default label in conjunction with standard search syntax to search for pages which don't have a certain label. 

Sounds complex so here's an example: the default label, applied to all pages, is dfet. You're looking for all pages which do not contain the label superseded. The search syntax is:

labelText:dfet NOT labelText:superseded

Because dfet is on every page, this will return a list of all pages which do not contain the label superseded

If anyone has a better solution which works on Confluence Cloud, please share!

Edit: Stephen Deutsch has a more elegant solution. 

James Strangeway
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 13, 2015

Thank you.

James Strangeway
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 23, 2015

This will work well Alex. Thanks

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events