The Search Results macro searches your Confluence site based on search terms specified in the macro code, and displays the results on the wiki page.

Using the Search Results Macro

To add the Search Results macro to a page:

  1. In the Confluence editor, choose Insert > Other Macros.
  2. Find and select the required macro.

Parameters

When editing, you can click on the macro placeholder and choose Edit to display the parameters for this macro in the Macro Browser.

Parameters are options that you can set for Confluence macros to control the content or format of the macro output. The table below lists parameters for this macro that can be set in the Macro Browser.

Parameter

Default

Description

Search Terms

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

10

Set a limit to the number of search results displayed.

Restrict to this Space Key

all

Specify the key of the space you want to search in. Note that this 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. For example:

  • 2h 35m
  • 3d 30m
    These are the values you can use:
  • w = weeks
  • d = days
  • h = hours
  • m = minutes
    If no time category is specified, Confluence assumes minutes.
    If you specify more than one time period (e.g. weeks and days), the periods must be separated by a space and they can come in any order.
    The time categories are not case sensitive e.g. '4d' is the same as '4D'.

Restrict to this Username

all

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

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.

Related Topics

Livesearch Macro
Searching Confluence
Working with Macros

Take me back to the Confluence User's Guide.