non-canned label searching against specified Spaces

eamonn mcquaid September 4, 2017

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

0 votes
eamonn mcquaid September 5, 2017

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

0 votes
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.
September 4, 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...

eamonn mcquaid September 4, 2017

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
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.
September 4, 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?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events