Google Custom Search: Use the UMN Search module in Drupal Enterprise (7 and 8)

The UMN Search Settings module comes with default configurations on all sites that use Drupal 7 Enterprise, Drupal 8 Enterprise, or Drupal Lite. There are also some configuration options available to you to customize the search experience on your site.

The module will only work if the standard header is being used. If the site is using a customized header, then the Google Custom Search Engine will need to be added manually.

Decide where search results will be displayed

The UMN Search module has two options for where results are displayed:

  • search.umn.edu
    • When visitors use the search box on your site, it will display the results on the University's search.umn.edu page.
  • A page on your site
    • When visitors use the search box on your site, the results will be displayed on a page within your site -- by default, this will be https://yoursite/search/results
    • If you have Google Analytics enabled for your site, you can view search statistics in your Analytics account.
    • There is an option to limit the search results only to specific site(s)

Access the UMN Search Options/Settings

To configure your search settings:

  1. Click Configuration in your site's admin bar
    the configuration button in drupal
  2. Scroll down to the Search and Metadata section
  3. Click UMN Search module
    1. Drupal Enterprise 7: the module is named UMN Search Options
      the search and metadata section with the module UMN Search Options highlighted
    2. Drupal Enterprise 8: the module is named UMN Search Settings
      the search and metadata section in drupal enterprise 8. the umn search settings is highlighted.

Configure UMN Search Settings

On the UMN Search Settings page you will see the following configuration options:

the settings for using search.umn.edu

If the Go to a page on my site option is selected, the UMN Search Settings window will display the on-site search options:

the umn search settings with go to a page on my site selected showing the additional on site search options.

Choose a Custom Search Engine (CSE)

This is where you select which Custom Search Engine (CSE) to use for searches on your site. There is a Custom Search Engine for each campus (Crookston, Duluth, Morris, Rochester, Twin Cities), as well as one for All Campuses. You will probably want to select either your home campus or All Campuses. For more information, see Choose a Custom Search Engine to Use for Search Results.

Results Page Selection

This lets you choose where your search results are displayed.

  • Go to search.umn.edu (default): this will redirect to search.umn.edu
    1. Note: if you select this option, the On-Site Search Options box will not be displayed
  • Go to a page on my site: this will display results on a page within your own site.

On-Site Search Options

Displaying search results on your own site gives you some additional configuration options:

Site Restriction Options

You can further refine what sites to include in searches by including URLs in this box.

  • Entering URLs here will limit search results to the specified sites only
  • A link will be included on your results page to allow users to repeat the search against the entire Custom Search Engine you've selected
  • Enter one URL per line. Do not include http:// or https://

Results Page Path

This page is created automatically. It determines the path on your site to show your search results.

  • By default, this is set to /search/results if you host results on your site
  • To change the default, enter the new path name in the format /yourtexthere
  • When changing the path, you may need to clear your site's cache for the page to be created.
    1. Click Configuration
    2. Click Performance (in the Development category)
    3. Click Clear all caches

People Search Setting

This setting lets you choose whether you want People Search results to be included on your web search results page.

  • If you select this setting, the search results page will display the first 3 people search results. If there are more than 3 people search results, the user will see a link to 'view more people search results'. That link will go to the Lookup page.

 Search Results Not Displaying

If you've attempted to use the UMN Search Settings/Options module on your Drupal 7 or 8 site, and it isn't working, it's likely the standard header has been overwritten on your site.

The UMN Search Settings/Options module can only work with the standard header that comes with Drupal 7 and 8 sites.

If you have a custom theme and custom header, you will need to either re-work your theme to use the standard header, or follow the steps in UMN Search: Manually add CSE to your site.