Searching and filtering
On the public website
All of the content on the website, including collection items, lessons, exhibits, topic sets, activities, and essays, can be searched from a unified search box, just like your own private Google for American Centuries. There is a search box on the home page, on the Search/Find page, and in the page header of every other page in the site (top left, beside the Menu icon.) On the Search/Find page you can limit your search by content type, topic, era, event, or place. Collection items can be limited further by date, item type, or material.
Within the transcriptions on a collection item page
Transcriptions are included in the main search index, which enables you to find collection items that include your search terms. If the collection item you find has scanned page images with transcriptions, you can then search within the pages of that single collection item to find exactly what you’re looking for. Transcription search is a feature of the item viewer that appears on a collection item page. As the instructions on the page say, “To view or search transcription, use the 3-bar menu button to open the sidebar. To search, use the magnifying glass button in the sidebar.“
In the WordPress admin
Users who are logged in to the WordPress Admin can search for pages on the All Pages screen. While it can be useful, this search is more limited than the public site search—it only indexes some of the fields on pages. When searching for a page to edit, best practice is to find the page on the public website (not in the WP Admin). Once you’ve found the page you want, edit it using the “Edit Page” link in the black admin toolbar across the top of the page.
Finding pages linked to a given page
Sometimes when you are interested in a page, you will want to find all of the pages that contain links to that page. To do this:
- Find the page you are interested in on the public website (not in the WP Admin)
- Copy the URL (web address) of that page (your browser will display the URL)
- In the search box on any page, paste that URL and press Enter to search.
This is especially useful when changing a page title so you can find all the pages that have links that need to be updated.
How search is implemented
The site uses two WordPress plugins to provide the site search and filtering. (See also WordPress Plugins.)
- Relevanssi provides relevance-based search results, replacing the built-in WordPress search feature. Relevansii also allows finer control over which fields are included in the search index and the importance assigned to each. It is configured from the Admin Settings | Relevansii menu.
- FacetWP provides the “Filter Found Items” feature on the Search/Find page which allows site visitors to limit their searches by content type, topic, era, event, or place. It is configured from the Admin Settings | FacetWP menu.
- FacetWP add-ons are small plugins that add features to FacetWP. The most important of these are Caching (to speed up repeated searches) and Relevanssi Integration (which does what it says.)
Maintaining the search indexes
Each of the search plugins builds indexes, large files that record every occurrence of words in the website and which pages they appear on. For the most part the indexing takes care of itself and needs no attention, but if you have been adding, removing, or changing very many (hundreds of) pages, search performance may be improved by rebuilding the indexes. For instructions, see Rebuild Search Indexes in the WordPress Administrator Tasks documentation.
how searching within transcriptions is implemented
Searching within collection item transcriptions is a feature of the Mirador item viewer that appears on each collection page. For more information, see IIIF Images & Manifests in the System Administration documentation.