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.

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.
- Log into Algolia
- Choose the correct Application for your Federated Search (if you have more than one)
- Select Search in the sidebar. This should take you to a page that shows your search index.
- Select Configuration.
- Select Facets.
You should now be at a page that looks like this:

You are now going to add "Sitename" as a facet.
- Click Add Attribute
- Select
site_name
- 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:

- Total number of search results across all sites
- Sidebar filters for each site in your federated search
- 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
If you wish to use Algolia search on the other sites: no.
If you are OK using Drupal search on those sites: yes. You can simply leave the Algolia Searching UI off on those sites where you do not want federated search to appear. The information from those sites will still be collected in the index.
Not without the cooperation and agreement of the site owner.
No. Federated search should only be added to sites that have their final URL and that are launched. Failure to do so could result in extraneous information in the index that may be cumbersome to remove.
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.