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

limiting search box to a space by default

Ron Boeth August 31, 2018

Using Confluence 6.11 Server - How do we constrain the results of a search to a specific space versus returning matching results from multiple spaces?  We understand the use of filters.

1 answer

0 votes
Sattesh M
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 11, 2018

Hello Ron, not sure if you can change the quick search in the top right corner to default to the Space, but you can add search boxes in any page in Confluence, and limit it to search that particular Space alone.

To do this, we will need to use the HTML macro. (This macro will be disabled by default, but you can enable it from the Manage add-on page.

<form method="POST" action="/dosearchsite.action" name="searchForm" style="padding: 1px; margin: 1px">
<input type="hidden" name="quickSearch" value="true" /> 
<input type="hidden" name="searchQuery.spaceKey" value="spacekey" />
<input type="text" accessKey="s" name="searchQuery.queryString" size="25"/>
<input type="submit" value="Search Space Name"/>
</form>

Once you've inserted the HTML macro, paste the code above, and change the "spacekey" value, to the spacekey of the space you want to limit the search for.

This will add a search box into any page you use the HTML macro with the code above, like below, and limit the search to that space alone.

search_box1.PNG

search_box.PNG

The original solution above was posted in the community question below, and you will find other solutions there as well.

Do let me know if you have any question.

Cheers,
Sattesh

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events