If you’re already a Hitchhiker, log in to access this content.
How to Create and Edit a Search Configuration| Hitchhikers Platform
What You’ll Learn
In this section, you will learn:
- How to access and Create a Search Configuration
- How to edit the Search Configuration
- How to use Experience Preview
- Refresher: UI vs. JSON
How to access the Search Configuration file
You can access the Search Configuration by clicking Answers in the navigation bar and then clicking All Experiences. This is where you will create the experience(s) within your account. Note that when you initially navigate to this page, you’ll be presented with a screen that will prompt you to create a new experience. The setup wizard will walk you through the steps to create a Search Configuration and when you make it through all of the steps, you will have the very first version of your backend Search Configuration. Once you’ve created the experience, it will look like the screenshot below:
From here, you can:
- Click View Experience to access the Search Configuration.
- Click Add Experience to add an additional experience to your account.
- Click the drop-down next to an experience to get options to Duplicate Experience and Delete Experience.
Creating a New Experience
There are four steps to creating a new experience. In each step, the setup wizard will walk you through the process and provide some best practices and guidance.
Step 1: Enter Experience Details
Enter a name and key for your search experience. The name is used for internal identification only, and the key is used as part of the API call when you eventually apply the configuration to your frontend build. You can always change the name later, though the key will stay the same.
Step 2: Select Entity Types
Choose the entity types from your Knowledge Graph that you would like Answers to search in this experience. You will automatically be presented with entity type options that are enabled in your account.
Step 3: Set Searchable Fields
For each entity type, confirm how you would like the different fields within it to be searched. We will walk through what each searchable field means and configuration differences in the next module (Core Configuration - Verticals).
Step 4: Hardcoded Prompts
You can choose to predefine the autocomplete prompts that your user will see when they go to enter a search term. This is a great way to guide the user to common queries or to certain verticals or entities.
Once you have stepped through each of these four steps, you have successfully created your very first Search Configuration!
How to edit the Search Configuration
Editing Configuration via UI or JSON
As a reminder, you can edit the Search Configuration through our interactive, in-platform UI or through the JSON editor. Both options work the same way technically in Answers; however, the UI uses a point-and-click interface whereas the JSON editor leverages code with JSON syntax. You can use either option to edit your Search Configuration.
Editing Configuration via UI
To update, maintain, and add additional configuration settings, you can access the left configuration settings and click into any of the options (i.e., Verticals, Query Suggestions, Synonyms, etc). The process of updating the configuration through the UI is interactive, so you will typically find yourself in a state of editing, scrolling, and saving.
Experience Preview
You can always test out your backend configuration in the UI by using the Answers Experience Preview. You can use the full screen interface of Experience Preview from the Home page of your Experience, or use panel on the right side of the Experience Details screen. Experience Preview will allow you to run various searches and preview how results are returned based on your configuration of the backend without having to switch over to your front-end experience.
Our Answers Experience Preview gives you greater visibility into your search configuration’s output, beyond just the order in which results are returned. With Test Search, you can view:
Entity Previews: The same entity previews that you can use and configure in Knowledge Graph are also be visible in the Answers Test Search module. This allows you to customize each entity type’s preview content settings (such as a photo or particular field). Learn more about customizable entity previews in this community post.
Featured Snippets: You can view featured snippets in the test search, making it easier to test and debug queries. Learn more about direct answers and featured snippets in the Direct Answers - Fields and Featured Snippets unit
NLP Filters: Test Search displays which NLP filters have been applied to a given query. Learn more about searchable fields and NLP filters in the Searchable Fields - NLP Filters unit
Test Searches Appearing in Search Logs: You can now run a test search and see it immediately in the search logs, so that it’s easier to debug queries over time. Clicking “Debug in search log” will take you directly to that particular query’s search log page, where you can see search factors, search and session IDs, and more.
View Raw API Responses: You can now view API responses directly from any query, streamlining debugging and optimization processes. Just toggle the “Show API Request” option in the top right of your Experience Preview results to view the API Request and Response information. You can click “View More” to expand details.
Editing Configuration via JSON
To access the Search Configuration in the JSON editor, simply click the “Edit as JSON’ link in the navigation bar.
Once you open the configuration in JSON, you will be presented with a full code editor:
With JSON (JavaScript Object Notation) syntax, a user can quickly add verticals, synonyms, query suggestions, query rules, and more. The JSON configuration will always mirror the UI configuration options but display the various options in code. You can learn more about JSON syntax in the JSON Module. Here is a Search Configuration sample code snippet for a one way synonym:
"synonyms": {
"oneWay": [
{
"phrase": "office",
"synonyms": [
"location"
]
},
]
}
Once you make a change, all you have to do is click Save, and you’ve created a new configuration version. This is important! Configuration versions allow you to test out your configuration changes, apply unique versions to a staging and production instance of your experience, and run version comparisons. You will learn more about versioning and version labels in the next unit.