Search Results Macro

Add the Search Results macro to a page to display the results of a pre-defined search.

Add this macro to your page

We ended support for this macro in Confluence 7.0
The macro no longer appears in the macro browser and can't be added to a page.
Any macro already on a page will still work.

Change the macro parameters

Macro parameters are used to change the behaviour of a macro.

To change the macro parameters:

  1. In the editor, click the macro placeholder and choose Edit.
  2. Update the parameters as required then choose Insert.

Here's a list of the parameters available in this macro. 


Parameter

Default

Description

Search Terms
(query

none

The search terms which this macro will use to generate its results.

You can refine your search query by using operators such as 'AND' and 'OR'. For example: my_query1 AND my_query2

For more information, take a look at the documentation on the Confluence search syntax.

Maximum Number of Results
(maxLimit

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
(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
(lastModified

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:
  • w = weeks
  • d = days
  • h = hours
  • m = minutes

For example:

  • 2h 35m
  • 3d 30m

Notes:

  • If no time category is specified, Confluence assumes minutes.
  • If you specify more than one time period (for example, weeks and days), you must separate the periods with a space. You can put them in any order.
  • The time categories are not case sensitive. For example, '4d' is the same as '4D'.

Restrict to this Username
(contributor

all

Specify the username of a Confluence user, to show only content created or updated by that user.

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.

Other ways to add this macro

Add this macro using wiki markup

This is useful when you want 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}
Last modified on Aug 22, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.