Skip to main content
Skip table of contents

SearchResult

Represents one item in the SearchResults

Display all search results
XML
<ul>
    #foreach ($searchResult in $searchResults.items)
        <li>$searchResult.description</li>
    #end
</ul>


Additional context for $searchResult.object

If the search-result-object is of type 'page' you get access to the page-object and its properties when calling $searchResults.object.


Methods

Name

Type

Description

$searchResult.absoluteLink

String

The absolute link to this object.

$searchResult.description

String

A description of this search result (usually the page or blog post title).

$searchResult.displayTitle

String

The display title of this search result (usually the page or blog post title).

$searchResult.getDescription(maxLength)

String

A description of this search result (usually the page or blog post title).

  • Parameter: maxLength

  • Type: int

  • Description: The maximum length of the returned description

$searchResult.getProperty(key)

String

The property of this search result for the given key. This will access the so-called content properties, which are different from the properties defined by the Page Properties macro.


Example Keys:


  • confluence.user.profile.position

  • confluence.user.profile.department

  • confluence.user.profile.location


  • Parameter: key

  • Type: String

  • Description: The key of the user property


$searchResult.link

String

The relative link to this object.

$searchResult.linkAsText

String

The relative, decoded link to this search result.

$searchResult.object

Linkable

The backing object of the search result.

$searchResult.qualifiers

List<SearchResultQualifierPlaceholder>

A list of this search result's qualifiers. Qualifiers are only available when using the CQL search.

Returns: the qualifiers

$searchResult.type

ContentType

The type of the search result.


Possible values:


  • page

  • blog_post

  • user

  • status

  • attachment



JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.