Configure Hawksearch using the B2B Commerce Hawksearch Connector

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 B2B 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 B2B 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 https://api.hawksearch.info.

  • 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 https://indexing.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 https://searchapi.hawksearch.com.

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

  • 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.

  • Enable Product Number Tiebreaker. If set to Yes, ties in search term results with identical relevance scores will result in Product search returns sorted by Product number. 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 B2B Commerce, perform a search rebuild, and complete the post-rebuild setup.

  1. At this time, restart B2B Commerce.

  2. Once B2B 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 B2B 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