Configure the Hawksearch connector

  • Updated

When enabled, this connector will communicate with Hawksearch, replacing Elasticsearch for Product, Category and Content indexing and searching. This a full replacement of the platform's search and functionality. Once Hawksearch is fully configured, it should be a transparent replacement for Elasticsearch.

Configure Search Provider settings

To enable the Hawksearch Search Provider, first ensure that the user has roles ISC_System and ISC_Implementer. Then follow these steps.

  1. Open the Configured Commerce Admin Console.

  2. Go to Administration > System > Settings.

  3. Search for "Search Provider Name" or go to Settings > Search > General.

  4. From the Search Provider Name dropdown, select Hawksearch.

  5. From the Search Indexer Name dropdown, select Hawksearch.

  6. From the Build Version dropdown, you may select Version 1 or Version 2. Both are compatible with Hawksearch. Note that Version 2 will perform faster, especially with complex search conditions such as multi-language. If you have questions about which version to use for your implementation, consult with your partner.

  7. Click Save.

Configure Hawksearch settings

Once you have set up Hawksearch as the Search Provider, you are ready to set up Hawksearch-specific settings in the Configured Commerce Admin Console.

To configure those settings, go to Administration > System > Settings. Search for one of the settings listed below, or go to Settings > Search > Hawksearch Index. Then configure the settings described below.

  • Hawksearch API Url. This is the base URL to Hawksearch that will be used to create the necessary fields used by the Application during Product, Category and Content searching. The default is adminapi-na.hawksearch.com.

  • Hawksearch Indexing Url. This is the base URL to Hawksearch that will be used to index the Product, Category and Content entries. The default is indexingapi-na.hawksearch.com.

  • Hawksearch Search Url. This is the base URL to Hawksearch that will be used for searching against the Product, Category and Content entries. The default is essearchapi-na.hawksearch.com.

  • Hawksearch Client ID. This is the identifier sent with Hawksearch requests to signal which instance they should be done against. This needs to be a GUID.

  • Hawksearch API Key. This is the secret key that is sent with the Client ID, validated by Hawksearch, that a request is valid against an instance.

  • Batch Size for Hawksearch Indexing. The number of records to send to Hawksearch in each request during indexing. The default value is 125.

  • Concurrent Requests for Hawksearch Indexing. The number of concurrent requests to make to Hawksearch during indexing. Reindexing is required for changes to this setting to take effect. The default value is 1.

  • Enable Ngram. If set to Yes, Product number and manufacturer item values will be indexed using Ngram indexing. This will index segments of the values to return relevant results for partial matches. For example, if your product numbers are formatted in this way--ABC12345--and your customers normally search only for the numeric segments, 12345 will be indexed, and a search for it will return a match for the product. Values will be indexed both with special characters included and with them taken out. The default is No.

Perform full search rebuild and complete post-rebuild setup

Once you have completed Search Provider and Hawksearch-specific configurations, you are ready to restart Configured Commerce, perform a search rebuild, and complete the post-rebuild setup.

  1. At this time, restart Configured Commerce.

  2. Once Configured Commerce has restarted, perform a full rebuild of the search index.

The Hawksearch fields are necessary for indexing of the Product, Category and Content entries. When the index rebuild completes successfully Hawksearch will now contain a list of all these Fields, displayed in the Hawksearch Dashboard, allowing for further customization such as Boosting.

After the initial search index build triggered in Configured Commerce, Hawksearch will need the fields below configured as Facets. After navigating to your Hawksearch instances Dashboard, open the Workbench from the top navigation bar. Expanding the Data Configuration will show a Facet section in the dropdown. When clicked, the Facets editor list page will be shown. Below is a table of the necessary Facet fields, the type, associated field, and type. Make sure that they are set to Visible On.

Display Name Facet Field Type Associated Field Facet Type Is Visible?
websiteFilters string websiteFilters Checkbox List On
url string url Checkbox List On
productLineFacet string productLineFacet Checkbox List On
priceFacet string priceFacet Checkbox List On
filters string filters Checkbox List On
categoryTree string categoryTree Checkbox List On
categories string categories Checkbox List On
brandNameFirstCharacter string brandNameFirstCharacter Checkbox List On
brandFacet string brandFacet Checkbox List On

 

Configure sorting

You can configure search result sorting settings in the Hawksearch workbench. For more information, refer to Hawksearch documentation on sorting.

Enable sorting

  1. Go to Workbench > Data Configuration > Fields.
  2. Edit the following three fields and toggle Enable Sorting to ON:
    • shortDescriptionSort
    • brandNameSort
    • price


enablesorting.png

Set sorting options

  1. Go to Workbench > Data Configuration > Sorting/Pagination.
  2. Edit the Default Product Sorting set. If a default sorting set does not exist, creating a new one by clicking on “Add Sorting” link.
    addsorting.png
  3. In the Default Product Sorting set, create the following seven sorting options (shown as Label; Param Name):
    • Best Match; score (set as default)
    • Product: A to Z; titleAsc
    • Product: Z to A; titleDesc
    • Price Low to High; priceAsc
    • Price High to Low; priceDesc
    • Brand: A to Z; brandAsc
    • Brand: Z to A; brandDesc
      sortingoptions.png
  1. For each of the sorting options, add the following sort fields in this order (shown as Field Name > Sort By):
    • Best Match: Score > Desc, shortDescriptionSort > Asc
    • Product: A to Z: shortDescriptionSort > Asc
    • Product: Z to A: shortDescriptionSort > Desc
    • Price Low to High: price > Asc, shortDescriptionSort > Asc
    • Price High to Low: price > Desc, shortDescriptionSort > Asc
    • Brand: A to Z: brandNameSort > Asc, shortDescriptionSort > Asc
    • Brand: Z to A: brandNameSort > Desc, shortDescriptionSort > Asc
      sortingvalues.png
  1. Save the sorting options.

Set the product number tiebreaker

You can configure sorting for searches that result in ties due to identical relevance scores such that search results returned will be sorted by product number. To do so, add sorting options with the ERP number.

  1. Go to Workbench > Data Configuration > Fields
  2. Edit the erpNumberSort field and enable sorting.
  3. Go to Workbench > Data Configuration > Sorting.
  4. Configure the sort fields in the following order for each sorting option (shown as Field Name > Sort By).
    • Best Match: Score > Desc, shortDescriptionSort > Asc, erpNumberSort > Asc
    • Product: A to Z: shortDescriptionSort > Asc, erpNumberSort > Asc
    • Product: Z to A: shortDescriptionSort > Desc, erpNumberSort > Desc
    • Price Low to High: price > Asc, shortDescriptionSort > Asc, erpNumberSort > Asc
    • Price High to Low: price > Desc, shortDescriptionSort > Asc, erpNumberSort > Desc
    • Brand: A to Z: brandNameSort > Asc, shortDescriptionSort > Asc, erpNumberSort > Asc
    • Brand: Z to A: brandNameSort > Desc, shortDescriptionSort > Asc, erpNumberSort > Desc
      tiebreakersort.png
  1. Save the sorting options.

  • Rebuild Index when you add or modify sorting.
  • You should only add Brand sorting when Brands is enabled in Configured Commerce.
  • You should only add Price sorting when List Prices are configured in Configured Commerce.

Configure pagination

You can define pagination on the PLP when logged in to Hawksearch:

  1. Go to Workbench > Data Configuration > Sorting/Pagination Administration.
  2. Under Pagination, click Edit next to Default Pagination. If a default pagination does not exist, create a new one by clicking Add Pagination.
    PLP_pagination_step_2.png
  3. On the Edit Pagination screen, set four pagination values in order: 8, 16, 24 and 32. Set 8 as the default option.
    PLP_pagination_step_3.png
  4. Click Save.

Set pagination for sitemap generation

You can define sitemap pagination when logged in to Hawksearch.

  1. Go to Workbench > Data Configuration > Sorting/Pagination Administration.
  2. Click Add Pagination and create a new pagination set with Name and Code set to sitemap.
  3. On the sitemap Edit Pagination screen, create a pagination option with the Label sitemap and value 300. Set this label as default.
    sitemap_pagination_step_3.png
  4. Click Save.
    sitemap_pagination_step_4.png
  • The default Results Per Page on the PLP comes from the default pagination option value set in Hawksearch. The Default Page Size setting in the Configured Commerce Admin Console System Settings is not used when Hawksearch is enabled.
  • For sitemap generation, the pagination option value maximum supported by Hawksearch is 300.