This page last changed on Aug 06, 2008 by smaddox.

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

Usage

In the example below, we assume that you want to search for all pages and other content types which contain the term 'my_query'.

What you need to type What you will get
{search:query=my_query}

Found 9 search result(s) for my_query

Search Macro (Confluence 1.4 User Guide)
Search Macro The Search Macro does an inline site search and displays the results in the page. Search Macro What you need to type What you will get \ Optional Parameters Set a limit to the number of search results displayed Specify ...
Nov 24, 2005
Re: Overlib Macro (Confluence Extension > Overlib Macro)
I am still waiting for the answer of my query
May 30, 2008 - All Comments
Search Macro (Confluence 2.0)
Search Macro (i) You need to edit in 'Wiki Markup' mode to include macros in your page. The Search Macro does an inline site search and displays the results in the page. Search Macro What you need to type What ...
Jun 25, 2007
Search Macro (Confluence 2.5)
Search Macro (i) You need to edit in 'Wiki Markup' mode to include macros in your page. The Search Macro does an inline site search and displays the results in the page. {}Search Macro{} What you need to type What ...
Sep 04, 2007
Search Macro (Confluence 2.5.6)
Search Macro (i) You need to edit in 'Wiki Markup' mode to include macros in your page. The Search Macro does an inline site search and displays the results in the page. Search Macro What you need to type What ...
Jun 17, 2007
Search Macro (Confluence 2.7)
Search Macro (i) You need to edit in 'Wiki Markup' mode to include macros in your page. The Search Macro does an inline site search and displays the results in the page. Search Macro What you need to type What ...
Jun 17, 2007
Search Macro (Confluence 2.6)
Search Macro (i) You need to edit in 'Wiki Markup' mode to include macros in your page. The Search Macro does an inline site search and displays the results in the page. Search Macro What you need to type What ...
Jun 17, 2007
(outdated) Search Macro (Confluence 2.5)
... identically to Confluence's builtin site search. \\ Usage: \ OR \ Parameter Required Default Description query yes none search query (what you enter in the search box) maxLimit no none sets the maximum number ...
Jun 17, 2007
(outdated) Search Macro (Confluence 2.5.6)
... identically to Confluence's builtin site search. \\ Usage: \ OR \ Parameter Required Default Description query yes none search query (what you enter in the search box) maxLimit no none sets the maximum number ...
Jun 17, 2007

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

{search:query=my_query1 AND my_query2}

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

Optional Parameters

Here is a list of the optional parameters. There are further usage examples below.

No Parameter Default Description
 1 maxLimit no limit Set a limit to the number of search results displayed.
 2 spacekey all Specify the key of the space you want to search in. Note that this is case sensitive.
 3 type all Specify the content type. The content types are: page, comment, blogpost, attachment, userinfo, spacedesc, mail.
 4 lastModified 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'.
 5 contributor all Specify the username of a Confluence user, to show only content created or updated by that user.

1. Setting a limit to the number of search results displayed

Display a maximum of 20 results.

{search:query=my_query|maxLimit=20}

2. Specifying the key of the space you want to search

Global space: Search within the Doctemp space only.

{search:query=my_query|spacekey=Doctemp}

Personal space: Search within jsmith's space only.

{search:query=my_query|spacekey=~jsmith}

3. Specifying the content type

Search within comments only.

{search:query=my_query|type=comment}

4. Specifying a time period in which the content was last modified

Search for content modified in the last one week and two days.

{search:query=my_query|lastModified=1w 2d}

5. Limiting the search results to content created or modified by a specific user

Search within content created or updated by jsmith only.

{search:query=my_query|contributor=jsmith}
Permissions

When a user views the page containing the Search 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 Confluence User Guide

Document generated by Confluence on Aug 07, 2008 19:09