Searchable Fields - Best Practices | Yext Hitchhikers Platform

What You’ll Learn

In this section, you will learn:

  • General tips on searchable field types
  • Searchable field type tips for common verticals

Overview

Yext’s multiple algorithms are incredible at understanding what a user is looking for to surface the most relevant results, but first we need to tell the algorithms where to look. This is where the search configuration comes in, as you learned about in the last few units.

To make the most of your search configuration, it is crucial to ensure that you are using the appropriate setting for each searchable field type you use. The following is a list of tips for setting up your searchable fields. For explanations of each searchable field type setting, refer to the Vertical Searchable Fields unit in this module for a high level overview. Specific units on each searchable field type are linked in the sections below.

In this unit, we’ll go through both general tips and tips for the most common verticals.

Note: If you are using Search for healthcare, there are several specific tweaks you can and should make to your configuration. Follow this Community post on other healthcare best practices .

General Tips and Tricks

The following are some general tips for how to use different searchable field types based on the content you want to make searchable:

Text Search is the simplest way to search a field. Search will simply look for the tokens in the query in fields set up with text search. Thus text search works best for short text fields with relatively unstructured data.

Use Text Search for:

  • keywords when these are just related to the entity and may not be searched exactly. We recommend using phrase match with more specific keywords when possible, but if the data quality is not certain, use text search.

Text Search tips:

  • If the field contains the full name of a person, like “John Doe”, phrase match will provide better exact matches for “John Doe” rather than text search results for both “John” and “Doe”.
  • Fields with similar and overlapping content should use text search rather than an NLP filter which is more restrictive. For example, if a retail bank had both “Student Checking Accounts” and “Checking Accounts” as products, use text search to surface both, whereas an NLP Filter would filter down to the one best match. Since search queries may refer to these products by similar but different names, don’t use phrase match which matches the content exactly: the search “Student Checking Accounts” would not return “Checking Accounts” and the search “bank accounts” would not return either.
  • Text search should almost never be used on long-form text fields like description. This will produce irrelevant results because there is a high likelihood of random keyword matches with such long text.

Semantic Text Search works by matching a user’s query to anything that is semantically similar (think “beef”, “steak”, and “cheeseburger” – these three terms have a similar meaning).

Use Semantic Text Search for:

  • name of entities where a user may not search for the exact terms, but is likely to search for something semantically similar (e.g., “shrimp” may be on a restaurant’s menu, but users could also search for “prawns”).

Semantic Text Search tips:

  • Semantic text search is ONLY available for entity names, and is not available for the locations vertical.
  • Semantic Text Search should not be used for names of proper nouns, as semantic similarity does not apply here.

Phrase Match

Phrase Match works best for text fields where you want the query to exactly match the content of the field.

Use Phrase Match for:

  • name of a person (e.g., “John Doe”) to only return exact matches for “John Doe” instead of text search (which would surface all results for both “John” and “Doe” separately).
  • keywords when these may actually be key phrases that should be searched exactly (e.g., if you want “Mortgage Loan Officers” to only return results for “Mortgage Loan Officers” and not results for “mortgage”, “loan”, and “officers” separately).

Phrase Match tips:

  • Make sure keywords added to entities in the Knowledge Graph represent the entity and are not just related to the entity. Think of keywords as synonyms for the entity, so setting keywords that are too broad will result in bad matches. For example, if you set “mortgage” as a keyword for a mortgage officer entity, that officer will return when the user searches “mortgage rates”, which is not a query that should return officers.

NLP Filter

NLP Filter is best for structured fields for which there are a finite number of options, such as department or builtin.entityType. It infers a specific filter and applies it to the search, making it a black and white filter, a much stricter setting than any other searchable field type.

Use NLP Filter for:

  • Fields that represent a specific category or label for an entity (e.g., filter products down to “Men’s Shoes”).
  • builtin.entitytype for every vertical to surface those entities when a user searches for the name of entity type. For example, searching “FAQs” would apply an NLP filter for the FAQs entity type, boosting that vertical to the top of search results.
  • builtin.hours for any entity type that you want to filter down to options that are “open now”.
  • builtin.location for any entity type that has an address and can be searched by location, e.g. locations, professionals, and jobs.
  • address.region (or other address field) for an entity type with an address where users are expected to search more specifically for city names (or by other parts of the address). This will create a more restrictive filter for location searches.

NLP Filter tips:

  • NLP Filters will exclude results that do not fall under that category from the search results.
  • NLP Filters use the exact content of the field, so be careful of duplicative categories like “Men’s Shoes” and “Men’s Shoe”. The algorithm will choose the best match and exclude results for as the other.
  • NLP Filters are available in Experience Training , so you can easily improve your search experience by accepting and rejecting filters.

Document Search works by matching query intent to long form, unstructured text to find the most relevant snippet of text within the document. Document search produces Featured Snippets to display on the frontend.

Use Document Search for:

  • description and body fields with long, unstructured content (e.g., help articles or product descriptions).

Document Search tips:

  • Document Search works well with extractive QA to surface direct answers! For more information, refer to the Direct Answers unit of this module.

Facets

Facets are also best for structured fields for which there are a finite number of options (e.g., department or builtin.entityType).

Use Facets for:

  • Fields whose filter you want a user to be able to toggle on the frontend.
  • With similar best practice tips, fields that are good candidates for an NLP filter are typically good candidates for facets as well. These searchable field types work well together because when an NLP filter is detected, the corresponding facet will show up as checked.

Facets tips:

  • Facets use the exact content of the field, so be careful of duplicative categories like “Men’s Shoes” and “Men’s Shoe,” as these will both show as options. We recommend consolidating these into one category.
  • Setting too many searchable fields as facets may be overwhelming to a user, so defer to the fields that are most likely to help a user narrow down the results.
  • Facets with lots of options can be made searchable. For instructions on how to implement this, refer to Searchable Facets in the Implementing Facets unit.

Sortable

Sortable allows a field to be used as a sorting method that is controlled by the algorithm (to show by default) or by the user (with frontend options).

Use Sortable for:

  • When you want to be able to sort by that will help provide relevant results and that have a clear sorting order

Multiple Searchable Field Types on the Same Field

Only use multiple searchable field types for the same field if it’s deliberate, or else it could cloud the process of which searchable field types are being applied.

  • NLP Filters would override other searchable fields because of its strict nature to filter down to only the one best match.
  • People names is an example of a deliberate use of multiple searchable field types and we recommend using both Phrase Match and Text Search. Results would return based on the number of matched tokens (review Tokens and Results Ranking in the Search Algorithm module), which will display results for Phrase Match and then Text Search. For example, if the search query is “John Doe,” phrase match would return all exact matches for “John Doe”, and text search would return any matches for “John” and any for “Doe”. Since a match to “John Doe” is stronger than a match to “John” or “Doe”, the phrase match results will appear above the text search ones.

Tips and Tricks by Vertical

The following are guidelines for setting searchable fields by vertical type. We have included instructions for the most common verticals: Locations, FAQs, Products, Professionals, and Jobs. These examples are meant to give you a starting point for how to approach searchable fields as you build your own Search experiences. Of course, your specific experience may have different entity types or different use cases that lead you to diverge from these guidelines. If you’re unsure about what to use for your specific experience, feel free to post in the Community!

Locations

To surface the best results in your locations verticals, add the following to your config as searchable fields:

  • Add text search to name.
    • Note: if all location entities have the same or similar names, using name as a searchable field is not recommended because a search for this name will surface all entities.
  • Add an NLP filter to builtin.location.
  • If you want to filter down results to only show a particular place when a user searches for a specific zip code, city, or state, set the field (e.g., address.city) as an NLP filter.
  • If you are using multiple NLP filters, you can add nlpFilterOrder to your config to set prioritization following this section .
  • Add an NLP Filter to builtin.entityType.
  • Add phrase match to keywords.
  • If your locations fall into multiple categories (e.g., hospitals and outpatient centers), consider adding the corresponding category field as a facet and an NLP filter.

FAQs

To surface the best results in your FAQs vertical, add the following to your config as searchable fields:

  • Add semantic text search to name.
  • Add phrase match to keywords.
  • Add an NLP Filter to builtin.entityType.
  • If your FAQs fall into multiple categories (e.g., account, order status, etc.), consider adding a category field as a facet and an NLP filter.

Products

To surface the best results in your Products vertical, add the following to your config as searchable fields:

  • Add semantic text search to name.
  • Add phrase match to keywords.
  • Add an NLP Filter to builtin.entityType.
  • If your products have features that fall under multiple but finite categories (e.g., brands, colors, parent products, or stock statuses), consider adding those feature fields as an NLP filter and a facet.

Professionals

To surface the best results in your Professionals vertical, add the following to your config as searchable fields:

  • Add text search and phrase match to name (name, first name, and last name).
  • Add phrase match to keywords.
  • Add an NLP Filter to builtin.entityType.
  • If professionals speak different languages, add an NLP filter and a facet to language.
  • If professionals have associated addresses, add an NLP filter to builtin.location.
  • If a healthcare account, also consider adding an NLP filter and facet to insurance accepted.
  • If professionals are associated with specific locations in the Knowledge Graph, consider adding phrase match and text search to related locations.

Jobs

To surface the best results in your Jobs vertical, add the following to your config as searchable fields:

  • Add semantic text search to name.
  • Add phrase match to keywords.
  • Add an NLP Filter to builtin.entityType.
  • Add an NLP filter to builtin.location.
  • If applicable, add text search to department and hiring organization (or, if the options are limited, consider adding these as NLP filter and facet).
  • Add an NLP filter to employment type.
unit Quiz
+20 points
Daily Quiz Streak Daily Quiz Streak: 0
Quiz Accuracy Streak Quiz Accuracy Streak: 0
    Error Success Question 1 of 3

    You would like your search experience to surface the entities of a certain type searched for (e.g. FAQs surface for an 'FAQs' query. What searchable field type should you set on which field?

    Error Success Question 2 of 3

    The managers of Turtlehead Tacos want their 'Ground Beef Tacos' to surface when users search for 'beef tacos' or 'steak tacos'. What searchable field type should they set for the name field of the Menu Item entity type?

    Error Success Question 3 of 3

    Multiple people filled in data for the category field for the Menu Item entity type so we have both 'Tacos' and 'Taco' as options. We want to use the category field as an NLP filter and facet. What do you suggest we do?

    High five! ✋

    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
Feedback