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

Limit a search bar to only one space in confluence

Oxana Ermolaeva September 13, 2022

Hi. I want to restrict a search bar in Service Desk space in Confluence to the articles only in this space, but when I try to enter some names of documents from other spaces, it shows them. I have used "live search macro" for creating this search field and search bar but it still gives access to documents from other spaces. I tried to edit it also in live search macro settings, I chose Service desk space, but it didn't work as well.  I will be glad if you could help me. I am using Confluence Cloud, by the way.

2 answers

1 accepted

0 votes
Answer accepted
Dam
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 13, 2022

Hi @Oxana Ermolaeva 

With the Live search macro, did you put @self in the Restrict to this Space Key param in the macro config ? It will restrict results to only the current space...

the doc of the macro is here: https://support.atlassian.com/confluence-cloud/docs/insert-the-livesearch-macro/

I hope it helps.

Cheers,
Dam.

Oxana Ermolaeva September 13, 2022

@Dam  thank you for your prompt reply. I clicked ''edit'' the livesearch macro and it opened the right side bar with parameters, but they are a little different from the article you sent. It shows me the following 

 

13.09.2022_16.58.47_REC.png

Oxana Ermolaeva September 13, 2022

@Dam I clicked the Space field and selected Service desk space only, but it still shows me articles from other spaces.

Dam
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 13, 2022

Humm its maybe a macro from an app... Did you choose your space here in the list of spaces ? (first param of your macro here)

Choose your space and try ;) it should work... @Oxana Ermolaeva 

Dam. 

Oxana Ermolaeva September 13, 2022

@Dam yeah, I selected only Service desk (my space), but it still shows me articles from other spaces :((

Dam
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 13, 2022

Oups I just noticed your last comment sorry... @Oxana Ermolaeva 

Ah yes the macro is a bit different than in the doc, I just checked. 

I tested it also with my cloud site, its working all fine for me, if I choose "Current space" in the list and results from the current space only are displayed... 

Capture d’écran 2022-09-13 à 16.07.45.png

Like Oxana Ermolaeva likes this
Oxana Ermolaeva September 13, 2022

@Dam yes, I tried both with setting "current space" and then also by the name of the space. I`m wondering what the reason can be here.

Oxana Ermolaeva September 13, 2022

@Dam  May I also ask you one additional question? It's about the connection between Jira Service Desk project and this Service Desk space in Confluence. As I got it from my settings they are connected. Because when I open Knowledge base page in Help Desk project in Jira, it sends me to Help Desk space in Confluence. So, do I get it right that if I can search documents from other spaces in Confluence, customers can also search the same documents in Jira by using search bar in KB? And if I restrict searching only in one space, they also will be able to search only in one space, right?

Dam
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 13, 2022

Its all based on permissions, so yes if you restrict searching only in one space, customers also will be able to search only in one space. @Oxana Ermolaeva 

Like Oxana Ermolaeva likes this
Dam
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 13, 2022

yes, I tried both with setting "current space" and then also by the name of the space. I`m wondering what the reason can be here.

Just to be sure... Did you publish the page after changing the macro param ? You need to change the param of the macro and then publish the page to update it, and then test the search... @Oxana Ermolaeva 

It's strange cause if there was a bug with this macro it should be for all atlassian site not only you...

Like Oxana Ermolaeva likes this
Oxana Ermolaeva September 13, 2022

@Dam  permissions? You mean not just restricting the livesearch macro bar, do I have to make restriction to access? Only in confluence or in Jira as well? I`m new to services, so please can u provide details how to make it. Thanks.

Oxana Ermolaeva September 13, 2022

@Dam No, I didn`t publish because I thought it automatically saves changes. Besides, when I checked changes it was set to Current space even though I didn`t publish it yet. I will try, thank you.

Dam
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 14, 2022

if you change the param in the live search macro then publish the page, and then test on the page the search, it should work ;) results of the current only will be displayed @Oxana Ermolaeva 

permissions are on the space level, for users and groups... so you dont need to check permissions on the live macro itself. 

Dam.

Like Oxana Ermolaeva likes this
0 votes
Alli Shea
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 13, 2022

Hi @Oxana Ermolaeva

There are two other ways to search within a space, in addition to the live search macro. 

1. Go to the search bar on the top right of your page, and see the "Filter by Space" area. Select the space you want to search within. 

Screen Shot 2022-09-13 at 9.56.41 AM.png

2. You could also go to the page tree (the left panel of a space) and select "Pages" section. This would bring you to a space-specific search that is limited only to content in that space. 

Screen Shot 2022-09-13 at 9.57.10 AM.png

Hope this helps!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events