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 ?
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...
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?
Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time! We're looking for people to participate in a remote 1-hr workshop...
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!
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