Uploaded image for project: 'Confluence Server and Data Center'
  1. Confluence Server and Data Center
  2. CONFSERVER-19054

Confluence search results should include content added to page via the {include} and {excerpt-include} macros



    • 14
    • 9
    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.


      NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.

      To improve Confluence's search, please provide an option to resolve all




      macro content before Confluence indexes whole page content.


      When Confluence indexes page content for searches, it doesn't resolve the content of these inclusions into the page first. Hence, when the user attempts to search for a page based on a term that's actually part of an inclusion's content, then the page that 'hosts' the inclusion will not show up in the search results.

      As far as the user is concerned, those terms are on the page when they view it. It's not until the user looks at the page's Wiki Markup when they'll realise that the content is only being referenced via an inclusion macro (and why the search didn't retrieve the 'host' page).

      It's often more useful to see the names/titles of these 'host' pages in search results, rather than those of the actual 'inclusion pages' themselves, since 'inclusion pages' (and titles) are typically out of context.


      To improve Confluence's search efficacy, Confluence could provide an admin console option to makes it resolve the content of all {include} and {excerpt-include} macros first, before it indexes the whole page content.

      If Confluence could resolve all inclusions before indexing whole page content, this will provide the following benefits:

      • If a user searches for text contained within {include} or {excerpt-include} macros, the names (and links) of pages that include this content will appear in the search results, rather than just the 'inclusion pages' further down the list of search results.

      • If a space uses the new 'Documentation Theme' and a user searches for text contained within {include} or {excerpt-include} macros using the search box in the TOC column (for example, any one of our product documentation spaces on CAC), the pages that include this content will appear in the search results, rather than not at all.

        Why would these searches show no results?

        The Documentation Theme requires a 'root page' within the space (from which the TOC is generated) to be set. When you start viewing pages within the space, the search box in the TOC column (by design) will only search pages contained within the 'root page' hierarchy. 'Inclusion pages', however, are typically kept outside this hierarchy to prevent them appearing in the TOC. Hence, if you use this Documentation Theme search box to look for terms contained within an 'inclusion page', you're likely to get no results.


        Issue Links



              Unassigned Unassigned
              ggaskell Giles Gaskell [Atlassian]
              204 Vote for this issue
              116 Start watching this issue