Official website

of the Commonwealth of Pennsylvania

AEM Components

Search Results Component

Through Coveo Search, the Search Results component offers a number of elements. These include a search bar, filtering, sorting, a list of results, and pagination. Coveo provides personalized, relevant search results for users and is used to improve website search quieries by providing fast and accurate results.

 

When a resident makes a search, they see responses displayed as Search Results Cards in a Search Hub. Card types include: Page, Document, Event, Location Card Address, and Location Card Text. Types vary based on the residents’ search query, as well as the author’s settings of the Search Results component of that page.

 

Aside from the standard Search Results component, Location Card Address Search Hubs may also be presented as interactive Maps, and several agencies have custom search results as well.

 

Sapient configures Search Hubs through Coveo and add the initial Search Results component to the page. Please contact a Sapient team member for assistance in creating new Search Hubs.

Overview

Component name: Search Results

Authors who can use: Sapient to initially configure; any to edit

Templates/page types that can use component: varies by page

Required or optional: varies by page; see above

Authoring Fields

Adding the Search Results component to the page

Please contact Sapient before adding a Search Results component to ensure it is configured correctly.

  1. Search Hub pathfinder field: Enter a link to the Search Hub configuration.
  2. Facets dropdown: Click “Add” to add facets to the component. If none are added, none will display.
    1. Facets are typically configured with tags on the individual search results (ex. the Services Search Hub has facets for Agency, Audience, Service Category, Service Type, and Life Event; users can filter on the tags to narrow down Service results). There is no limit to the number of facets that can be added.
  3. Enable Time Frame checkbox: Check off to add the time frame authoring options. Default unchecked.
    1. Select Start./End Date dropdown: Select whether the time frame filter displays start date or end date. Default start date.
    2. Enable Date Range checkbox: Check off to allow users to select a start date and end date. Results will fall between the selected dates.
    3. Time frame fields
      1. Time Frame Label field: Add a label for the time frame. Ex. add "Next two years" to indicate that results show only for the next two years of events.
      2. Unit of Time dropdown: Select a unit of time. Results will only display within the selected unit. Ex. select "Year" for the "Next two years" example.
      3. Period of Time dropdown: Select Past or Future. Results will only show accordingly. Ex. select "Future" for the "Next two years" example.
      4. Time Span number selector: Select time span for the unit of time selected above. Ex. enter "2" for the "Next two years" example.
  4. Sort Options: If no sort options are added, results will automatically sort by Relevance.
    1. Primary sort dropdown: Add a sort option. This will be the default sort. This should usually be Relevance, unless another option should be the default (ex. Event Date for a calendar Search Hub).
    2. Secondary sort dropdown: Add a secondary sort option (ex. Alphabetical). Users may choose to switch to this sort.
  5. Display Sort and Filter by default checkbox: Check off whether the Sort and Filter options should automatically display on the page, without user needing to click and open (relevant for Agency Content Page template). Default unchecked.
  6. Enable Per Page Navigation checkbox: Check off to give users the option to select number of results per page, and to click through pages of results. Uncheck to display 25 results, with a "Load More Results" button to display the next 25. Default unchecked.
  7. Download Search Results Details
    1. Enable Download CSV checkbox: Check off to give users the option to download search results. Default unchecked.
    2. Download CSV Button Label field: Add a label to display on the download button.
    3. Coveo and CSV Fields field: Add Coveo and CSV fields separated by a comma. A sample is provided.
    4. Max Number of Items number selector: Add a value between 100-5000.
  8. Hide Sections checkboxes: Select which features of the Search Results component should be hidden, if any. Default unchecked.
    1. “Hide Labels” refers to the Tag pills displayed on the bottom of Search Result Cards. Tags will still apply through filtering, but will not display visually.

Accessibility

  • There are no specific accessibility notes for the Search Results component.

Other tips

  • Search Results for pages and documents are driven by the tags given to pages and assets in the Page Properties/Asset Properties. They are not manually authored. Reference the Page Cards guide and Document Cards guide for more info.
  • Location-based Search Results are used to show results about specific counties/offices/districts. They are authored with Location Card Content Fragments. There are both Address and Text variations, for Location Cards with a specific address vs. with general geographic-based information. Reference the Location Cards - Text and Address guide for more info.
  • Event-based Search Results are used to show upcoming or past events. They are authored with Event Card Content Fragments. Reference the Event Cards user guide for more info.
  • If the Search Results component is added to a page with Side Navigation, the Sort & Filter pane displays on the right. When clicked, it will be an overlay on top of the component.
    • On pages without Side Navigation, the Sort & Filter pane displays on the left. It is visible on default.
  • To pre-filter a Search Hub:
    • Go to the parent Search Hub that should be broken up.
    • Filter the results as needed.
    • Copy the URL.
    • Navigate to the page that requires a CTA in the authoring environment. Link to the copied URL.
    • Publish the page.
    • The CTA will take users to the filtered Search Hub.

Search Result examples

PA.gov general site Search Hub Figure A: Search Results component for the PA.gov's All Search Hub. Facets appear on the left. No filters are selected. Sort dropdown is set to Relevance.
Farm Show's calendar Search Hub, which uses Event Cards Figure B: Search Results component for Farm Show's Calendar Search Hub. Sort & Filter options appear on the right, as the page has Side Navigation (not pictured). No filters are selected. Sort dropdown is set to Event Date.
Sample Search Results component with start date filter and start/end date picker Figure C: Time frame options for a Search Hub. Users may apply the filter for all events to have started in the last two years. Users may also limit results within a start/end date.
Sample Search Results component with filter applied and search input box hidden Figure D: Sample Search Hub with a filter applied to only show results tagged with February as the month. The search input box is hidden.
Sample Search Results component with Load More button Figure E: "Load more results" button. This is the default for users to add more results.
Sample Search Results component with pagination and results per page options Figure F: Sample Search Hub with pagination and results per page options. Author must select Enable Per Page Navigation checkbox, otherwise "Load more results" button will display.