Configuring Hawksearch results widget

In this article you will find:

Goal

This document provides information about configuring the ‘Hawksearch results’ widget.

Prerequisite

Configured Sitefinity connector - Connector: Activation

Remark

In order ‘Hawksearch result' widget to show results from the corresponding index during the first load of the page (without executing a search request) you must set the search index in the widget designer.

Enable SPA search box

You can set up the ‘Hawksearch results’ widget to work as a Single Page widget (to use its built-in search box).

As a prerequisite, you will need to create a V4 or V4L search index -Managing V4 Indexes, Managing V4L Indexes

  1. Navigate to a Sitefinity page that has a placed ‘Hawksearch results’ widget

  2. Open the widget designer

    1. Check ‘Show Search Box’

    2. Set search index

  3. Publish the page

Associate with Landing Page

  1. Configure Landing Page for the corresponding Hawksearch V4 instance

  2. Navigate to a Sitefinity page that has a placed ‘Hawksearch results’ widget

  3. Open the widget designer

    1. Go to the Advanced section

      1. In the Data field enter the Url of your Landing Page in the following format:

        {"CustomUrl":"/landing-page-url"}
  4. Click Save

  5. Publish the page

Configuring facet behavior

  1. Navigate to a Sitefinity page that has a placed ‘Hawksearch results’ widget

  2. Open the widget designer

    1. Go to the Advanced section

      1. If you are using the Vue SDK you can apply the configuration to the facets. More specifically - if the facets can be selected multiple times or only one at a time. The default behaviour is multiple selections. If a facet needs to be a single option, the value in the Data field should be this:

        {"_facetConfig": {"brand": "single", "color": "multiple", "size": "single"}}

        The key-value pairs are using the facet field machine name (can be found in the request headers) as a key and either “single“ or “multiple“ as a value.

      2. If you have a landing page configured - place the facet config on the same level:

        {"CustomUrl": "...", "_facetConfig": {...}}

b. Facet collapsing configuration options

i. collapsedByDefault - If true the collapsible facets will be collapsed when facets are displayed.

ii. collapseAllExceptCurrentTarget - If true the facets will act like accordion. When one facet is expanded the others will collapse.

iii. collapseOnDefocus - If true the facets will collapse when the user clicks somewhere out of the facet area.

iiii. Example

3. Click Save

4. Publish the page

Configuring the search field

  1. Navigate to a Sitefinity page that has a placed ‘Hawksearch results’ widget

  2. Open the widget designer

    1. Check ‘Show Search Box'. If the search field is not needed - leave it unchecked. The following settings won’t take effect if the search box is not available.

    2. Go to the Advanced section

      1. Input the search box configuration settings in the Data field.

         

  1. Click Save

  2. Publish the page

Configuring tabs

  1. Navigate to a Sitefinity page that has a placed ‘Hawksearch results’ widget

  2. Open the widget designer

    1. Go to the Advanced section

      1. Input the tab configuration settings in the Data field.

         

  1. Click Save

  2. Publish the page

Configuring URL parameters update

  1. Navigate to a Sitefinity page that has a placed ‘Hawksearch results’ widget

  2. Open the widget designer

    1. Go to the Advanced section

      1. Input the configuration settings in the Data field.

        When the URL update is enabled, all aspects of the search will be populated as parameters in the URL. If this is not needed, disable this setting.

  3. Click Save

  4. Publish the page

Configure additional search behaviour

  1. Navigate to a Sitefinity page that has a placed ‘Hawksearch results’ widget

  2. Open the widget designer

    1. Go to the Advanced section

      1. Input the configuration settings in the Data field.

        This setting will enable the page to scroll up to the top after the user input

  3. Click Save

  4. Publish the page

Configure the result item

  1. Navigate to a Sitefinity page that has a placed ‘Hawksearch results’ widget

  2. Open the widget designer

    1. Go to the Advanced section

      1. Input the configuration settings in the Data field.

         

  1. Click Save

  2. Publish the page

Configure the suggestion item

  1. Navigate to a Sitefinity page that has a placed ‘Hawksearch results’ widget

  2. Open the widget designer

    1. Go to the Advanced section

      1. Input the configuration settings in the Data field.

         

  1. Click Save

  2. Publish the page

Configure pagination links for SEO

  1. Navigate to a Sitefinity page that has a placed ‘Hawksearch results’ widget

  2. Open the widget designer

    1. Go to the Advanced section

      1. Input the configuration settings in the Data field.

This setting will expose all pager links for SEO.

Â