This macro was intentionally excluded from the new editor and will be deprecated from the legacy editor soon.
The Search Results macro searches your Confluence site based on search terms specified in the macro parameters, and displays the results on the wiki page.
Using the Search Results macro
To add the Search Results macro to a page:
- In the Confluence editor, choose > Other Macros
- Find and select the required macro
Speeding up macro entry with autocomplete:
- In the new editor - Type / and the beginning of an element (tool or things in the insert menu) to see a list of suggestions.
- In the legacy editor - Type { and the beginning of the macro name to see a list of suggested macros.
Details are in Keyboard shortcuts, markdown, and autocomplete.
To edit an existing macro
Click the macro placeholder and choose Edit. A macro dialog window will open, where you can edit the parameters of the macro.
Parameters
Parameters are options that you can set to control the content or format of the macro output. Where the parameter name used in Confluence storage format or wikimarkup is different to the label used in the macro browser, it will be listed below in brackets (example
).
Parameter | Default | Description |
---|---|---|
Search Terms | none | The search terms which this macro will use to generate its results. For more information, take a look at the documentation on the Confluence search syntax. |
Maximum Number of Results | 10 | Set a limit to the number of search results displayed. |
Restrict to this Space Key | all | Start typing the space name to find the space, or specify the key of the space you want to search in. Note that the key is case sensitive. |
Content Type | all | Specify the content type. The content types are: page, comment, blogpost, attachment, userinfo (the content of user profiles only) and spacedesc (the content of space descriptions only). |
Last Modified | all | Specify a period of time in weeks, days, hours and/or minutes, to see the content modified within that time frame. These are the values you can use:
For example:
Notes:
|
Restrict to this Username | all | Specify the username of a Confluence user, to show only content created or updated by that user. |
Wiki markup example
Wiki markup is useful when you need to add a macro outside the editor, for example as custom content in the sidebar, header or footer of a space.
Macro name: search
Macro body: None.
{search:lastModified=3w|query=choc|contributor=admin|maxLimit=10|type=page|spacekey=ds}
Notes
Permissions: When a user views the page containing the Search Results macro, the search results will show only pages and other content types for which the user has 'View' permission.