loading

Additional Search Configuration Settings| Hitchhikers Platform

What You’ll Learn

In this section, you will learn:

  • Location Support by Country
  • Additional Stop Words
  • Base Score for Verticals
  • Timeout
  • NLP Filter Order

Overview

There are additional Search Configuration settings that can be configured through the UI or the JSON editor. Certain features may only be available via the JSON editor. (Oftentimes, new config features will be rolled out to the JSON editor in advance of the UI.) We will always denote which features are JSON-only both in this module and in the Community. As a reminder, you can access the JSON editor by clicking “Edit in JSON” within your experience:

navigating to search configuration

Let’s walk through the additional configuration options below.

Location Search Support by Country

For any of your entities that have a lat/long (think: an address profile field), you will need to make sure you explicity set country support for each unique country in the Search Configuration.

Location support by country can be set within the UI under “Additional Settings”:

country restrictions

Here’s a sample JSON snippet where you can see the countryRestrictions object listing out multiple countries, which enables international location search support:

"countryRestrictions": [
  "US",
  "GB",
  "FR",
  "JP",
  "DE",
  "CH",
  "CN",
  "IT",
  "ES"
],

This is for Search Quality so that we include those countries when we’re searching locations. We want to search across as limited a set of places as needed so we don’t have any false positives (think about a search of “locations in Paris” – it could be Paris, France or it could be Paris, TX in the US – if we know to only search locations in France or the US, we eliminate needing to choose which one to use). By default, we will search US locations but if you have any entities outside of the US, you’ll need to include the ISO Country Code for each country in the configuration so we can expand the search and incorporate any language or country-specific nuances.

The above Search Configuration set up enables the below international country support:

example of a country search

Additional Stop Words

Stop words are common words that the Answers algorithm will intentionally treat differently to deliver more accurate results to the user. By default, the Answers algorithm already has a list of stop words built-in, such as of, the, in, etc., in order to streamline a query at the time of the search. However, in your Search Configuration, you can take this one step further with the top level property of additionalStopWords, which allows for customization with additional stop words.

It can be set in the UI under “Additional Settings”:

additional stop words

Here’s an example of the JSON Snippet you would use to add the custom stop word “synergic” to your account:

"countryRestrictions": [...],
"additionalStopWords": [
    "synergic"
  ]

Similarly to Location Search Support by Country, this addition is also for Search Quality. Consider a hypothetical healthcare brand called “Synergic Health”. Synergic’s brand name spans across the account in multiple different entities in the knowledge graph, such as a service entity of Synergic Cancer Research or an FAQ entity about Synergic’s COVID policy. If you search for “dermatologists at Synergic”, you may not want the Research center or the FAQ to return. You can add the brand name as a stop word to get to the heart of the query more efficiently, reducing the matching across verticals to only non-brand name tokens.

Base Score

The score of a vertical determines where the vertical appears within the universal results returned. By default, the score for each vertical is 0. If two verticals have the same score, the sorting logic will fall back to relevance to the query.

The Base Score is the starting score on a vertical. This defaults to 0. If the Base Score is adjusted, the vertical score will be adjusted regardless of the query. Remember that the scores are really all relative to one another and have no absolute meaning. In other words, don’t stress about whether a score should be “45” or “50” or “5000” – it’s all relative to other intent scores you set.

To set the Base Score, use the baseScore property inside the root of the vertical. BaseScore only accepts an integer. Here is an example of setting the Base Score on the products vertical to 100.

{
  "verticals": {
    "products": {
      "baseScore": 100
    }
  }
}

As previously noted, the algorithm will now score the products vertical (100) against other verticals to determine the vertical ranking in Universal. If all other verticals do not have a baseScore set, that means they default to 0 and products will ALWAYS show up first (regardless of the query).

You’ll learn about how to adjust this score based on criteria (for example, if a search term contains a phrase) in the Query Rules module.

Timeout

The timeout is a specified time interval (in milliseconds) given for each vertical in a query. All verticals completed before the timeout will still be returned even if others haven’t.

It can be set in the UI under “Additional Settings”:

additional settings config

It can also be edited through the JSON Search Configration editor:

  "timeout": 5000,

NLP Filter Order

Answers offers natural language processing (NLP) features by allowing Administrators to turn on nlpFilter, which helps filter down search results based on the users query alone. In some cases, however, the same filter value exists in two different fields that have nlpFilter turned on. To better handle this tie between field filters, you can configure the object nlpFilterOrder. This array will allow you to specify the order in which you’d like nlpFilters to be selected when conflicts happen.

As an example, a healthcare client has Cardiology as a value in their specialties field and their builtinFile.medicalConditions field. Without nlpFilterOrder, a search for “cardiology near me” would trigger one of these filters arbitrarily. Using nlpFilterOrder, an Administrator can choose which field is prioritized in a tie.

With specialties first in the below array, specialties will be given priority in the case of a tie.

"verticals": {
    "facilities": {
      "entityTypes": [
        "healthcareFacility"
      ],
      "facetOrder": [],
      "name": "Facilities",
      "nlpFilterOrder": [
        "specialties",
        "builtinFile.medicalConditions"
      ],
      "searchableFields": {
        "builtinFile.medicalConditions": {
          "nlpFilter": true
        },
        "specialties": {
          "nlpFilter": true
      },
      "source": "KNOWLEDGE_MANAGER"
    }


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

    What configuration option would you choose to always boost a vertical to the top of a results page?

    Error Success Question 2 of 2

    What are stop words?

    Soon you'll be your brand's hero! 🎓

    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