loading

Configuring No Results| Hitchhikers Platform

What You’ll Learn

In this section, you will learn:

  • How to configure showing all results when a query has no results
  • Why a no results screen is important
  • How cross-component features like no results works

No Results screen

When a user can’t find a result in an Answers experience, they are presented with a “no results” screen. This feature is common across search engines, both third party and first party. The no results experience is almost just as important as (if not more than) the experience a user has when they get results, otherwise we risk them dropping off and result in a “bounce” against which we are so vehemently fighting.

By default, the no results behavior specified by the SDK mimics the behavior you see on Google:

Google no results on Google

Answers Default No Results Screen no results on Answers

For now, this is the behavior for Universal Results screen, although you could choose to override the SDK behavior by defining your own No Results template (you’ll learn more about this in Overriding Components.

As an alternative, on Vertical Search only, you can choose to display all results for a vertical when no results are found. It would look like this:

no results on Answers - displayAllResults

Why would you want to do this?

In general, no results happen in two scenarios:

  1. Search Quality: A user is looking for an entity that is not available. For example, on a health system’s experience, if a user searches “Providers in Texas who speak spanish” but the Answers API returns with nothing. This is all about Search Quality and could be attributed to the data in the Knowledge Graph (or lack thereof), Search Configuration, or the Answers algorithm. As an Admin, you would want to review these examples and help to fix them over time.

  2. User Error: On a vertical search, a user queries for something related to a different vertical. For example, a user queries “how to pay my bill”, but on the provider vertical. They should have asked this question on the “All” tab (Universal Search) or the “FAQs” tab (Vertical Search).

By displaying all results, you are:

  • Giving users a suggested next action by directing users to more relevant verticals or surfacing available results in that vertical
  • Providing users with other relevant content

How to ‘Display All Results’ on the No Results Screen

The NoResults feature is part of VerticalResults and is a unique sub-component since other components have settings for it. Most other components are self-contained.

To enable the Advanced No Results UI you’ll need to do a few things:

  • Enable it in VerticalResults in ComponentSettings
  • Specify how you want each component impacted by No Results to behave when there are no results. This includes:
    • Pagination
    • Map Configuration

Here’s what this could look like on a Vertical page with a Map and with Pagination:

{
  "verticalKey": "Locations", 
  "pageTitle": "Location Search", 
  "componentSettings": {
    "SearchBar": {
      "placeholderText": "Search", 
      "title": "What are you looking for today?"
    },
    "VerticalResults": {
      "noResults": {
        "displayAllResults": true 
      }
    },
    "Pagination": {
      "noResults": {
        "visible": true 
      }
    }
  },
  "verticalsToConfig": {
    "Locations": { 
      "cardType": "location-standard", 
      "icon": "pin", 
      "mapConfig": {
        "mapProvider": "MapBox", 
        "noResults": {
          "visible": true,
          "displayAllResults": true
          }
      }
    }
  }
}

In the Answers Hitchhikers Theme, page templates will have the No Results feature specified by default. You can choose to override this or remove this as you’d like. This is different behavior in the SDK where the No Results is off if not specified.

unit Quiz
+20 points
Daily Quiz Streak Daily Quiz Streak: 0
Quiz Accuracy Streak Quiz Accuracy Streak: 0
    Error Success Question 1 of 2

    If you include the `VerticalResults: displayAllResults: true`, what happens on the frontend when someone runs a search on a vertical that has no results?

    Error Success Question 2 of 2

    What is the default no results behavior in the SDK and Theme?

    Way to go, you passed! 🏁

    You've already completed this quiz, so you can't earn more points.You completed this quiz in 1 attempt and earned 0 points! Feel free to review your answers and move on when you're ready.
1st attempt
0 incorrect
Splash Loading