non-canned label searching against specified Spaces

Hi,

Trying to find a way, whereby Confluence users can search for labels across several spaces (i.e. a space category as opposed to a single space or all spaces). The user enters a label into a search box (so not a pre-canned search query) and it only searches for the label in a number of specified spaces (possibly using a space category)

With the current confluence search macros
1. Existing search macro work either or a single space or all spaces
2. To specify a label you need to do so by adding a filter following the initial search
Would like to achieve this type of searching without having to develop customised code or using the labelText syntax
I have searched for plug-ins to address this and have not managed to locate any. Has anyone found a solution to the above challenge ?

2 answers

This widget could not be displayed.
Stephen Deutsch Community Champion Sep 04, 2017

You can almost get there with standard CQL. Something like

space.title ~ "space" and type=page

would return all pages in spaces which contain "space" in their name.

Unfortunately there doesn't seem to be any extension for space category like space.category or space.label.

Are you running Confluence Server? Scriptrunner for Confluence would be able to help you out here as it includes a CQL Search macro and has an option to write an extension to CQL that could include the space category. However, as far as I know, this is not a built in element, so code would have to be written (although there are examples on the documentation page). 

Otherwise you can search multiple spaces with CQL, but you have to know the space key for each space, so this probably wouldn't work so well...

Stephen thanks for your response. Running Confluence Server 6.2.2. Our end users will not be in a position to create CQL syntax. looking to have a search box that a user can provide a label and then the secrch is limited ot a number of spaces 

Stephen Deutsch Community Champion Sep 04, 2017

Hi Eamonn,

I thought about it and there might be a way to do it with a user macro. Give me some time and I'll get back to you.

My idea is to have a search box that has a predefined space category field from the editor but that will search for a particular label that is input on the page. This is what you are looking for, right?

This widget could not be displayed.

Hi Stephen, many thanks for the response and effort - yes that is what i am looking for

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

143 views 1 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you