Federated Search

Enabling the federated search option allows site visitors to search across more than one of your websites from on-site search. Site visitors can then filter down results based on site and see a visual indicator of links that will take them off the current site.

Step 1: Getting started

This option is available on sites that use enhanced search through Algolia. If you do not already have an Algolia index available, first follow the instructions on How to Set Up Third Party Search

Follow the self-service instructions on this page to make an account, an index, and set up Algolia on one of your sites.

Step 2: Enable Federated Search on Stanford Sites

On the site you set up in Step 1, check the box for Federated Search.

Image showing checkbox for federated search in the UI.

You will then get an additional text box on the form that will allow you to override your site name in the search results display, if needed, to provide clarity. This is an optional step, and it will appear in the sidebar filter on your search results page (see example of how this will be used below in Test out your new Federated Search.)

Step 3: Enable Federated Search on additional sites

Take the complete set of settings from Steps 1 and 2 and fill in the same settings with the same information every site you wish to have included in your federated search. The only difference between the settings should be that final, optional field.

You may add additional sites to your federated search at any time.

Step 4: Set up search facets for your search results page

In order for the sidebar filters to appear to filter results by the various sites in your search, you need to tell Algolia what information to use.

  1. Log into Algolia
  2. Choose the correct Application for your Federated Search (if you have more than one)
  3. Select Search in the sidebar. This should take you to a page that shows your search index.
  4. Select Configuration.
  5. Select Facets.

You should now be at a page that looks like this:

Click on image to expand

You are now going to add "Sitename" as a facet.

  1. Click Add Attribute
  2. Select site_name
  3. Select Review and Save Settings

Step 4: Test out your new Federated Search

Once your sites have all been indexed, you may test Federated Search on any of your sites, provided you have Algolia Searching UI enabled on that site. Perform a search on that site. You should see something like the following:

  1. Total number of search results across all sites
  2. Sidebar filters for each site in your federated search
  3. An external link icon at the start of any result that leads off the current site

Best Practices

Search result text

Successful on-site search relies on distinctive page names and good page descriptions to reduce ambiguity. This is even more important on a federated search! For example, if you have an "About" page on 12 sites in your federated search, you may wish to make those titles more specific. 

Federated search and intranets

While there isn't anything that will prevent you from including one or more Stanford Sites Intranet in a federated search, we suggest proceeding with caution. In the absence of manually created Page Metadata, search results will display some of the page content, which could lead to a information security issue. And, non-privileged users would still not be able to access the page via search results, which could lead to a confusing site visitor experience.

Frequently Asked Questions about Federated Search

   Examples in the wild

Vaden Health Services. Vaden Health Services has a constellation of sites all related to student health. Check out how Federated Search helps students find help and information.

Related Topics