Scoped search on Mass.gov

Mass.gov offers a way for visitors to focus, or scope, their searches to specific organizations so they see more relevant content.

By default, scoped search lets Mass.gov visitors choose to search for results within any organization associated with that page (in the Organization(s) field that shows in Offered by) when using the search box on a page. The default search for a visitor will always be a sitewide search. If a visitor types in a search term and clicks enter without choosing a scoped search option in the dropdown, their search results will include all of Mass.gov by default.

For example, if a visitor is on a page offered by the Office of Problem Gambling Services and starts typing in the search bar at the top, they will see an option dropdown to search specifically within that organization’s pages because it is referenced in the Organization(s) field.

If you have a page that has multiple organizations listed in the Organization(s) field that show in Offered By, those organizations will all be offered in scoped search.

Any organization page will always include itself as a search scope – there is no need to add the organization to the Organization(s) field on the org page itself.

Modifying how scoped search appears on your organization’s pages

Scoped search is always active, but you can adjust how it appears for your organization’s pages.

Excluding an organization

You can choose whether to exclude your organization from appearing in scoped search filter options throughout the site.

On the Overview tab on your Organization page in the CMS, there are two options related to scoped search. This affects scoped search on all your organization’s pages.

The first, “Mass.gov Organization search filter,” should be clicked if you DO NOT want this organization to show up as a scoped search option. In the example above, this means the option to search specifically within the Office of Problem Gambling Services pages would NOT appear if this box were clicked. The use cases for this are small, however, and may only make sense if your organization has very few pages on Mass.gov, or if most of your content lives on an independent site.

Including the parent organization

The second option, “Organization parent Mass.gov search filter,” lets authors choose to enable a parent organization to always show as a scoped search option for any page that references that organization. If selected, scoped search will let the visitor search within that organization’s parent. On the Organization content type, you can define an organization’s parent organization in the Overview tab in the “Parent Organization” field (not the parent page field).

For example, on this page from the Interoperable Communications Bureau (ICB), the scoped search offers both ICB and the Executive Office of Technology Services and Security (EOTSS). This is because EOTSS has been designated as the parent organization on the ICB organization page and the checkbox to include the parent organization in the search filter has been checked.

Click this box if you DO want your organization’s parent organization to appear as a scoped search option whenever the child organization is shown.

It’s a good idea to include the parent organization if it’s likely to have relevant content, or, again, if the content associated with the Offered by organization is relatively small (for example, if there are less 10 pages on Mass.gov for it).

Last updated