Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Searching for page content in tagged space + tagged page?

Florian Hein April 24, 2023

Hi there.

I'm trying to search a confluence page for body content that has a certain tag and that lives in a certain space that is also tagged.

It seems I cannot do hierarchical searches in the Advanced Search bar.

I tried:

1. labelText:spaceTag AND labelText:pageTag "Page search term"

2. labelText:spaceTag labelText:pageTag AND "Page search term"

 

Is this even possible?

Thanks for your hints.

1 answer

0 votes
Nicolai Sibler
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.
April 24, 2023

Hi @Florian Hein , welcome to the Community!

I don't think there's a need to run the search on the Advanced Search page here.

To find your page, you'd just filter the quick search with the page label and the space category:grafik.png

... because tags are named labels on pages and categories in spaces.

Hope that helps!

 

Kind regards,

Nicolai

Florian Hein April 24, 2023

Thanks @Nicolai Sibler that is certainly a way. We have power users that like to save clicks. If they had a predefined query which they could simply copy/paste into the advanced search box and only have to type one more item (search term(s)) then it would save them a couple of clicks as they wouldn't have to click on two dropdowns and search for label + category and type in the search term(s).

But hey, this is just a minor thing, was just curious.

 

Thanks.

Nicolai Sibler
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.
April 25, 2023

Sorry for the misunderstanding @Florian Hein , I didn't understand you are searching for a CQL query.

This is more complex than it seems at first glance, because labelText refers to a page's (or attachment's) metadata while space.category refers to the metadata of a space. That's why I can't query

labelText=[Page label] AND space.category=[Space category]

because search results cannot have both a label and a category - they're either pages/attachments or spaces.

However, I am confident that someone with more CQL syntax skills than I will answer here and solve your question.

Florian Hein April 25, 2023

@Nicolai Sibler Got you. Nonetheless, thanks for explaining what I suspected. Trying out Script Runner, let's see.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events