Searchable Fields - Document Search | Yext Hitchhikers Platform
What You’ll Learn
In this section, you will learn:
- What Document Search is
- When to Use Document Search
- How to Configure Document Search
Overview
As you will learn in the upcoming Search Algorithm module, Yext leverages a multi-algorithm approach with Search. One of the Algorithms, known as the Document Search (or Extractive QA) algorithm, matches query intent to an unstructured document or piece of text and uses Dense Passage Retrieval to extract the answer in a featured snippet to the user. This algorithm can be activated for a given Knowledge Graph field by taking two steps in your configuration:
- Turn on Document Search as a Searchable field: this handles matching query intent to the unstructured text
- Ensure Featured Snippets are active as a Direct Answer type: this turns on the Dense Passage Retrieval to extract the answer in a featured snippet to the user (note: this step will be covered in the Direct Answers unit ).
We will cover Step 1 in this unit, which is turning on Document Search as a searchable field. As a reminder, the unstructured text must be stored as an entity field value in the Knowledge Graph and activated as a Searchable Field. Rich Text Snippets are now supported in direct answer cards, so feel free to experiment with lists, bulleting, and numbering in your unstructured text! Here are a few example entities that could contain long, unstructured text:
- Help Articles (Body content)
- People (Bios)
- Product Descriptions (Description content)
- Blog Posts (Body content)
- Job Qualifications (Bulleted list)
- … and much more
Document Search Configuration, Example, and Best Practices
Let’s walk through an example of how to configure Document Search in a Products Vertical.
- Example Vertical: Products
- Example Field: Description (
description
) - Example Field Type: Profile Field
Document Search can be enabled on any long-form, unstructured data point within your Knowledge Graph, including rich text. As an example, imagine Yext has Document Search turned on for its product entities’ description
field. (The description field has long, unstructured text in the Knowledge Graph.) Activating Document Search will index the unstructured text.
Here we see how Document Search can return a featured snippet sourced from company descriptions that answers the user query “what does Yext do?”:
As with all other searchable fields, you can turn Document Search on with our point-and-click Search Configuration UI:
You can also add the Document Search field via JSON within the searchableFields
object:
"searchableFields": {
"description": {
"documentSearch": true
}
}
You can view direct answers and featured snippets in the Test Search, making it easier to test and debug queries that should yield direct answers. You can also see the linked result entity, just like you would in your frontend.
Putting it All Together: Direct Answers and the Frontend
Direct Answers
In the
Direct Answers unit
, we will discuss the two types of direct Answers: Featured Snippets and Field Values. In summary, Featured Snippets will be extracted from Document Search and shown at the top of the results page to a user. They can either be configured to Allow All
or Approve Only
. By default, all Featured Snippets returned from Document Search will be exposed to the user, or set to Allow All
, in your Search Configuration. See below for a preview of the new Direct Answers > Prediction Mode Search Configuration section:
If you would like to only allow approved Featured Snippets to appear for the user, you can do so from the Experience Training section of your Experience Configuration. This will be discussed in the Post Launch Optimization module in the Experience Training unit .
Here is a quick preview of how the configuration might look if you choose to use JSON instead of the Search Configuration UI to set up Document Search and Direct Answers:
{
"verticals": {
"products": {
"entityType": "product",
"searchableFields": {
"c_description": {
"documentSearch": true
},
"name": {
"phraseMatch": true
}
},
"directAnswers": {
"featuredSnippets": {
"predictionMode": "APPROVE_ONLY"
},
"fieldValues": {
"eligibleFields": [
"c_category", "c_features"
]
}
}
}
}
}
As you can see, there is a directAnswers
object that controls featuredSnippets
. We will explain this further in the
Direct Answers unit
!
The Frontend
Document Search is supported on the Search Jambo Frontend with Hitchhikers Theme 1.20 or later. Click here to learn more about how to configure this on your frontend!