Hi, is there a search box in Confluence that searches multiple spaces?
Asked by DebbieR:

Hi,  
I have an application that has multiple separate spaces to store FAQs, User Guides and Training Manuals. On the app landing page, I can't find a search box that will search nominated spaces (ie: the separate FAQs, User Guides and Training Manuals spaces), From what I can gather, there is no one search box that searches multiple spaces, you either get to search one space or the whole site. Am I missing something? Thanks very much, Debbie


Answers:
author: Davin Studer
body: You can do it with search syntax. Just make sure the Space drop down is set to All Spaces. Below is an example search

```
policy AND procedure AND (spacekey:HR OR spacekey:TEST)
```

image2014-11-20 15:52:43.png

**Update to add screenshots for below comment:**

When you add the live search macro don't specify any space keys.

image2014-11-24 14:18:44.png

Then when you are viewing the page you can use this search syntax to get what you want.

image2014-11-24 14:21:25.png  
[](https://community.atlassian.com/t5/Confluence-questions/Hi-is-there-a-search-box-in-Confluence-that-searches-multiple/qaq-p/314658?attachment-id=1623){#link_1192e4996fcedb}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/53219/1/image2014-11-24%2014%3A18%3A44.png){#display_1192e4996fcedb_0}  
[](https://community.atlassian.com/t5/Confluence-questions/Hi-is-there-a-search-box-in-Confluence-that-searches-multiple/qaq-p/314658?attachment-id=1624){#link_1192e4996fcedb_0}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/53219/2/image2014-11-24%2014%3A21%3A25.png){#display_1192e4996fcedb_2}  
[](https://community.atlassian.com/t5/Confluence-questions/Hi-is-there-a-search-box-in-Confluence-that-searches-multiple/qaq-p/314658?attachment-id=1625){#link_1192e4996fcedb_1}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/53219/3/image2014-11-20%2015%3A52%3A43.png){#display_1192e4996fcedb_4}

comments: author: DebbieR
body: Thanks Davin but it's actually a search box I want to place on a page. I've tried the Livesearch macro, the search box macro and the knowledge base search macro (we use the Documentation theme) and couldn't get it to work even with your search syntax?


author: Davin Studer
body: It should work just fine in the live search macro if you have not set that macro to only search a specified space.


author: DebbieR
body: Hi Davin, I don't think it works and I have tried it previously. See": <https://confluence.atlassian.com/display/DOC/Livesearch+Macro> and the comment below that is 5 years old now!Hi Stefan,As far as I am concerned, the parameter 'space' accepts just one space name to be searched. Perhaps the following improvement request will enable multiple spaces searches in future.<http://jira.atlassian.com/browse/CONF-7227>Vote for it and feel free to add yourself as watcher.


author: Davin Studer
body: Yes. the space parameter will only accept one space. That is not what I am saying though. One of the options for space is "All Spaces". If you set the live seach macro to "All Spaces" then within your search syntax you can specify the specific spaces.


author: DebbieR
body: Thank you, but I'm still not clear on this. The only option I can see to add any space info is in the field "Restrict to this Space Key'', where the default is all spaces. There is no search syntax option in the macro itself? What am I missing? See: <https://confluence.atlassian.com/display/DOC/Livesearch+Macro>Thanks so much for trying to help me Davin.


author: Davin Studer
body: See my above update. I have added screenshots as I cannot add them here.


author: DebbieR
body: ahhh I see, it's the search syntax you can use. Sorry I thought it was within the macro. Thanks very much for that. I can instruct our users to use that search syntax. I did actually find the 'Knowledge Base Search' macro works by searching multiple spaces, however when you get the results, the page links (ie: 1 2 3 4 Next \>\>) is not correct. Strange!


author: Instant Search
body: The [Instant Search Macro Plugin does this](https://marketplace.atlassian.com/plugins/ZFIN.instantsearch/server/overview) does this.


author: DebbieR
body: Thanks so much Steve. I'll install now and test :smile:


author: Steve Gerstner [bridgingIT]
body: If you use the [subspace-plugin](https://marketplace.atlassian.com/plugins/de.communardo.confluence.plugins.subspace), you get a macro to achieve your goal.

You can organise a structure in your space with a master and so called subspaces. In the plugin is a macro which lets you search in such a group of spaces.


author: DebbieR
body: Hi Jonathon,

Thanks very much. I tried that and it comes up with a drop down selection of spaces I can choose from, but they are still searched separately (ie: ProStix FAQs, ProStix User Guides, ProStix Training Manuals and ProStix Videos spaces) See attached. What am I doing wrong? Thanks

Search box.png

[](https://community.atlassian.com/t5/Confluence-questions/Hi-is-there-a-search-box-in-Confluence-that-searches-multiple/qaq-p/314658?attachment-id=5460){#link_1192e4d2b8e13b}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/53217/1/Search%20box.png){#display_1192e4d2b8e13b_0}

comments: author: Jonathan Simonoff
body: Debbie -- you are right. Sorry about that -- I'm not sure if it used to work the way I was expecting, or it was just my expectation. It certainly isn't doing what its docs imply now.


author: DebbieR
body: Thanks Jonathon :-)


author: Jonathan Simonoff
body: You can use the search-box macro to add a search like that to a page.

That is, though, part of the Content Formatting plugin. <https://marketplace.atlassian.com/plugins/com.adaptavist.confluence.contentFormattingMacros> . (Content formatting has a free version and a paid version with more. This is one of the free ones. However, I think your users will still see the paid macros, but not be able to use them, which may be awkward. You might be able to disable the paid macros so they don't show in the macro browser.)

Update: As Debbie pointed out, the macro now just gives you a choice list allowing you to choose the spaces you specified individually, plus you can choose all space and all personal spaces, so it looks like all specifying ones gets you is that they appear in the choice list, individually. So, this does not answer the question ![sad](/html/@C495B4504065515364EB1894F812B34C/images/emoticons/sad.png "sad").

comments: author: DebbieR
body: I've asked Adaptavist. We'll see what they come back with. Thanks


author: Stacey Jenkins
body: Came to this page after searching for a way to limit a search to personal spaces. As of today, the search box doesn't work using the '@personal spaces' configuration on the search box. It still returns results from all spaces.


Tags: confluence-administration