Exclude Comments from Search
Asked by Peter Vojtech:

Hi everyone.

Goal: We want to exclude/hide comments that appear in Search results.

Ideally excluding comment results to anonymous users. Ones that use QuickSearch and/or Advanced Search. A solution for all user groups would also be acceptable.

* Is it possible to 'pre-set' a filter or parameter on our default QuickSearch and/or Advanced Search to achieve this?
* Alternatively is it possible to restrict the actual comments so they don't appear in search results for an anonymous user?

Thank you.

![ExcludeLikeThis.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/56488iAD741E2A53DF12F8/image-size/large?v=v2&px=999 "ExcludeLikeThis.PNG")


Answers:
author: Shannon S
body: Hello Peter,

Thank you for contacting us!

Although it takes a few more clicks, you can filter out any comments from your search results by clicking the checkboxes for the content types you **do** want to see, just under where it says **Filter by \> Type** . You have**Comment** currently selected, but try selecting everything but comment here.

The Quick Search feature itself is not pre-configurable. It is also not possible to modify the behavior of a search, even for anonymous users. We do have a feature request for this below:

* [CONFSERVER-5338](https://jira.atlassian.com/browse/CONFSERVER-5338) *Make quick search scope a site configurable option*
* [CONFCLOUD-5338](https://jira.atlassian.com/browse/CONFCLOUD-5338) (Cloud version of the same request above)

Please vote on the feature request to show your support.

As for a workaround, you may find that one of our search-related add-ons for Confluence could help you with your case. I would recommend having a look at them and see:

* [Confluence Search Add-ons from Marketplace](https://marketplace.atlassian.com/search?product=confluence&query=confluence%20search)

I'm not too familiar with these myself, but you're welcome to have a look and give them a try. If you have any questions about any specific add-on, you can raise a question in our **Marketplace**collection here on Community.

Let me know if you have any questions about this.

Regards,

Shannon

comments: author: Peter Vojtech
body: Hi Shannon,

Thanks for the links to those feature requests. I have added a vote.

The alternatives you mention still require additional steps or information to be added by the end user. Our product is used by anonymous users and a demographic not familiar with filters or search syntax for a quick search.

At this point I can't accept the answer as our goals remain outstanding.

Thanks

Peter


author: Shannon S
body: Peter,

Thank you for your response. At this time, the only available method within the local Confluence Search is to configure the search scope within the Full Search, as I have mentioned.

The exact functionality you're looking for is mentioned in the feature request ticket I shared with you ([CONFSERVER-5338](https://jira.atlassian.com/browse/CONFSERVER-5338)).

Other possible workarounds would be:

* The [Live Search macro](https://confluence.atlassian.com/doc/livesearch-macro-163415902.html), which would enable you to embed search into a specific page in Confluence. This allows you to dynamically search Confluence based on a set of parameters that you provide it.
* The [Search Results Macro](https://confluence.atlassian.com/doc/search-results-macro-139511.html), which would allow you to embed a specific list of results on a page.

I hope that helps, but do let me know if you have any further concerns.

Regards,

Shannon


Tags: comment

confluence-server

permission

search

server