Configuring Hawksearch box widget
In this article you will find:
Goal
This document provides information for configuring the ‘Hawksearch box’ widget.
Prerequisite
Configured Sitefinity connector - Connector: Activation
Created V4 Index -Managing V4 Indexes
Or
Created V4L Index - Managing V4L Indexes
Set search results page
Navigate to a Sitefinity page on which you have placed a ‘Hawksearch box’ widget
Open the widget designer
From “Where to display search results“ select a search results page (page with ‘Hawksearch results’ widget)
Select a Search Index
Publish the page
Configuring the search field
This feature is only available for the Vue SDK
Navigate to a Sitefinity page on which you have placed a ‘Hawksearch box’ widget
Open the widget designer
Go to the Advanced section
Input the search box configuration settings in the Data field.
{"_searchBoxConfig":{"reloadOnEmpty":false,"redirectOnEmpty":false,"redirectToCurrentPage":false}}
The configuration fields have the following usage:
reloadOnEmpty - Refresh the search results with an empty keyword, but keeps all other facet selections. This is available if a results widget is dropped on the same page.
redirectOnEmpty - Redirects to the results page even if the search field doesn’t have a keyword
redirectToCurrentPage - If the set redirect page is the current one, forces the page to reload
Click Save
Publish the page
Configure the suggestion item
This feature is only available for the Vue SDK. It is available when one or more of the configured fields on the dashboard for title and link are missing. Also handles multilingual field support.
Navigate to a Sitefinity page on which you have placed a ‘Hawksearch box’ widget
Open the widget designer
Go to the Advanced section
Input the configuration settings in the Data field.
{"_suggestionItem":{"linkField":"link","titleField":"title"}}
The configuration fields have the following usage:
titleField - Specifies which autocomplete output field to display as the title
linkField - Specifies which autocomplete output field should be used for the redirect link
Click Save
Publish the page