Use the Search module to add a plain search bar. If you prefer more formatting options, use a Search Highlight module.
To add this module to a space overview, go into the Space Overview Editor. To add this module to other pages in your Confluence space, use the Content Layout macro.
The Search module shows results from your entire Confluence instance.
Module settings
You have the following options:
Simple. Filter search results by label and space.
Advanced. Use CQL to create your own filter, for example:
Do a complete content search using the CQL: text ~"*$query*"
Do a complete content search on the space using the CQL: text ~"*$query*" and space.key=$spacekey