How do I prevent attachments from being listed in search results?

Jeffrey Manning August 11, 2022

Is there a way to prevent attachments from being displayed to users in search results? 

3 answers

1 accepted

0 votes
Answer accepted
Volker Weinreich August 11, 2022

Hi Jeffrey,

If you want to prevent other types from appearing in the search results immediately, you could include the Livesearch macro on the page and set various defaults for the search: space, label, type, etc.

You can put the macro on the sidebar (Look and Feel > Sidebar) like this:

{livesearch:spaceKey=@self|size=medium|additional=none|placeholder=Search for pages|type=page}

Greetings,

Volker

0 votes
Robby Holtmann_IntraFind Software AG_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
August 23, 2022

With iFinder Confluence Search you can define which content types (sites, attachments, blogs, comments, ....) should be found by the search.

 

This solution is fully embedded in Confluence and is a high-quality Enterprise Search engine for Confluence. It delivers top results based on linguistic analysis and offers many additional features.

It is also possible to connect other data sources and applications (websites, Jira, SharePoint, file shares, and many more).

Additional to the search UI, you can place also a result list and search bar on Confluence sites - with the iFinder Search Macro (part of iFinder Confluence Search).

These articles may help you:

Let me know, if you need further information or like to get a demo first.

Best

Robby

0 votes
Nicolai Sibler
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 12, 2022

Hi @Jeffrey Manning ,

I'm not sure if I understood the question. Do you mean attachments in general or a couple of specific attachments?

Actually you can't prevent any content from being indexed. If there's an attachment, it's listed. So I'm afraid there's only workarounds.

  • To exclude attachments from the Confluence search you'd have to enter
    [search term] NOT type:attachment
    (See https://confluence.atlassian.com/doc/confluence-search-syntax-158720.html for details.)
  • If we are talking about a couple of specific attachments, you'd restrict the page they are added to as a user will not see an attachment as a search result that's on a page he's not allowed to see.

Hope that helps!

Kind regards,

Nicolai

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events