Search scopes

By default, your site has one search scope, which is the content of your website. You can create additional search scopes to give your visitors alternative content groups to search through.

Up to three search scopes can be displayed on your site's search results page — see example below.

three search scopes on the search results page

Example of three search scopes on the search results page: default scope ('This site'); a search collection ('All Mosaic sites'); an external search ('Search the web')

Three types of search scope can be created:

  • Search collection. Specify a group of other Mosaic sites that you want to let your site's visitors to search across. This scope type supersedes the legacy Shared search functionality*
  • Section search (available when Section search is enabled for the site). Specify a subset of your site's pages that you want to provide a focused search scope for. This scope type is mainly for use in the Section search widget but can be displayed on the search results page too. Contact the Mosaic team to request section search
  • External search. Specify an external search service that your visitor's can pass their search term on to, and allow them to continue their search on that service

*Shared search collections that were created before the introduction of search scopes were migrated to new search collections as part of the release of this functionality.

  1. Go to Site Settings > Search tab > Search scopes section > click the link to 'manage your Search scopes'
  2. Select the search scope type: 'Search collection'
    example search collection creation

    Example search collection creation

  3. Provide a name for the the collection [see 1 in the example above] — this will be displayed to your site's visitors on the Search results page
  4. Add the primary domain of each site you want to include in the collection [see 2 in the example above] — this can either be the '[prefix].web.ox.ac.uk' format domain or a custom domain for the site
  5. Click 'Look up sites' to run the validation check that makes sure the domains are for Mosaic sites [see 3 in the example above]
  6. The results of the look up are displayed to the right of the domains input field [see 4 in the example above]. If a domain/domains aren't in use on a Mosaic site, a validation notice 'No site found' will display in the look up results, next to the domain name [see 5 in the example below]. If this happens, check the domain(s) displaying the notice are entered correctly, amend them and click the 'Look up sites' button again to re-run the validation. 
    the search collection domain lookup checks whether a given domain is valid

    Search collection domain lookup displaying an error when a domain isn't associated with a Mosaic site

  7. Click 'Save'
  8. An entry for the search collection will be displayed in the Search scopes summary table. The collection can be edited or deleted from the summary table

 

Displaying another site's content in your search collection

When a site (Site A) adds another site (Site B) to a search collection:

  • Site B won't be informed that its content can be searched from Site A

  • Site B is not automatically able to search across content on Site A. To enable reciprocal shared searching, Site B will need to setup a search collection which specifies Site A

 

Section search scopes are mainly used used with the section search widget, though they can also be used on the search results page. See the Section search documentation for help creating a section search scope.

When a visitor on your site's search results page clicks the external search scope tab, a new browser tab is opened and a search is performed on the search service you've specified for the scope using the terms the visitors used on your site's search — see the example user journey for using external search below.

  1. The website visitor searches for a term on the Mosaic site
    visitor performing site search

    Step 1: A visitor enters a search term in Mosaic site's search bar and clicks the search button

  2. The visitor chooses the external search from the scope tabs on the search results page
    website visitor selecting the 'external search' option on the search results page

    Step 2: The visitor chooses the external search scope on the search results page

  3. A new browser tab is opened and a search is run on the specified external search service using the term the visitor entered on the Mosaic site
    a search term entered on Mosaic automatically used on an external search service

    Step 3: The visitor's search term (entered on Mosaic) is automatically used on the external search service specified by the external search scope

 

To create an external search scope:

  1. Go to Site Settings > Search tab > Search scopes section > click the link to 'manage your Search scopes'
  2. Select the search scope type: 'External search'
    external search scope setup example

    External search scope setup example

  3. Provide a label for the external search scope (maximum of 20 characters) [see 1 in the example above]. This will be displayed in a tab on the search results page. An 'external-link' icon will be displayed next to the label text
  4. Provide search URL for the external service [see 2 in the example above]. You will need to provide a URL which includes the appropriate search query parameter for the service you want to use, and a placeholder for the search terms:
    • Search query URL. To get a URL which includes a search query parameter, go to the search service you want to use and run a search. Note the URL structure for the search results page and copy the URL from its beginning up to and including the first instance of the '=' character, for example:
      • DuckDuckGo query URL: 'https://duckduckgo.com/?q='
      • Bing query URL: 'https://www.bing.com/search?q='
      • Google query URL: 'https://www.google.com/search?q='
      • www.ox.ac.uk (main Oxford website) query URL: 'https://www.ox.ac.uk/search?query='
    • Placeholder for search terms. This is the character set '$1'. '$1' will be subtituted for the visitor's search term when the external search page is loaded
  5. Click 'Save'
  6. An entry for the external search scope will be displayed in the Search scopes summary table. The collection can be edited or deleted from the summary table

You can display up to three scopes on the search results page.

Note about the default search scope

This is the scope that is displayed when the search results page loads. The 'This site' scope (for the current site's content) is set as the default scope and is displayed in the first search scope position (the left-most tab on the search results page). Another scope can be set as the default and can be displayed in the first scope position. Also, the 'This site' scope can be removed from the search results page using the display options.

 

To display a scope on the search results page:

  1. Go to Site Settings > Search tab > Search scopes section
    search scope display options

    Search scope display options

  2. Under 'Search scope selection', choose the name of the scope you want to display from the dropdown list next to the scope position — for example, 'Search scope two'
  3. Choose whether to set the scope as the default using the radio option 'Set scope [number] to default?' (external search scopes can't be set as the default)
  4. Save the settings
  5. A tab for each scope will be displayed on the search results page