Change default search settings?

Is it possible for me to change search to always search at the site level, regardless of where I am in the community?

What I mean by this is:

  • If I search on the home page of the community, it searches the entire community regardless of groups. This is what I want. The user will find content from everywhere.
  • If I search on a group, it searches just the group I'm in unless I tell it to look at the entire community. I'd prefer it always look at the entire community, unless the user swaps it to search just the group.

Can this be done?

Thanks!

Parents Reply Children
  • So only able to have this option if upgrade to 11.1? 

    Yes, 11.x is updated with regular service releases. The latest 11.x is recommended as it includes other minor feature improvements and bug fixes.

    How would I accomplish this on my current platform?

    In 11.0, you would need to modify the queries at the point they occur -- which means modifying the implementation of the Site Banner (for inline search) and the Search Result List widget (for advanced/full search) to exclude comments from results at the points where the Search API is accessed.

  • The recommendation of upgrading is preferred due to additional enhancements and fixes as well as the fact these are removed from the index altogether (perf), but you can force a condition on all queries that removes comments.

    For banner you can append ' -type:comment' on ~line 18 in searchquery.jsm.

    For advanced search, edit Search Result widget ~line 182 to '$searchQuery.Add("Query", "$query -type:comment")'.

    When you do upgrade just remove these edits.