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
  • One thing you asked for in your OP was to be able to default the search to 'Anywhere', even when in groups.. I don't think that got answered in this thread, so I went looking for how to do this. From my limited tests so far (i.e. please test this properly before saving it on Production Wink) I think you need to customise this line in Site Banner > ui.js ..

    Change that from 'first' to 'last' and it'll always search 'Anywhere'.

    It'd be great if this was a configuration option in the Site Banner widget.

  • That works great but how do I get the secondary filter to always default to "All"?

  • Former Member
    0 Former Member in reply to Bill Traynor

    Hi Bill, "All" should be the default for the secondary filter, unless the other filters and query only return results of one type. Can you share an example of it not being the default?

  • Here is the results of a search from our community homepage.  The secondary result defaults to highlighting the Files results.  I don't want that, I want it to default to All.

  • Former Member
    0 Former Member in reply to Bill Traynor

    Is this the first time you search, or after another search? When searching fresh for a query with results in more than one category, the selection will default to All. Otherwise it will default to the first available category (that with the most results), which will then persist to new text searches within the same page load (ie, if you searched a second time).

    Changing this behavior would require some more extensive customization in the Site - Banner widget to properly select the "All" meta category when it appears, and not force-select it over another selection a user has made. Additionally you would need to consider which use cases you would want to leave the category selection alone - for instance if a user searches one phrase, selects a category, then searches another phrase expecting that category selection to stick.

Reply
  • Former Member
    0 Former Member in reply to Bill Traynor

    Is this the first time you search, or after another search? When searching fresh for a query with results in more than one category, the selection will default to All. Otherwise it will default to the first available category (that with the most results), which will then persist to new text searches within the same page load (ie, if you searched a second time).

    Changing this behavior would require some more extensive customization in the Site - Banner widget to properly select the "All" meta category when it appears, and not force-select it over another selection a user has made. Additionally you would need to consider which use cases you would want to leave the category selection alone - for instance if a user searches one phrase, selects a category, then searches another phrase expecting that category selection to stick.

Children