The connector is configurable inside the project’s Web.config file.
In order to configure the connector, add the following sections inside <configuration> → <configSections> element:
<section name="hawksearch" type="Optimizely.Hawksearch.Connector.Utils.HawksearchConfigurationSection, Optimizely.Hawksearch.Connector" /> <section name="engines" type="Optimizely.Hawksearch.Connector.Utils.HawksearchEnginesCollection, Optimizely.Hawksearch.Connector" />
Then, inside the <http://system.net > element, you can fully customize the behavior of the connector. An example:
<hawksearch indexsuffix="dev" shouldprintignoredfields="true" indexingenvironment="https://indexing-dev.hawksearch.net" searchenvironment="https://searchapi-dev.hawksearch.net" dashboardenvironment="https://dev.hawksearch.net" trackingenvironment="https://tracking-dev.hawksearch.net" recommendationsenvironment="https://recs-dev.hawksearch.net" contentreadpagesize="1000" itemindexingapilimit="125" hierarchyindexingapilimit="125" ignoretracking="false" variantindexingstrategy="VariantAttributesRollUp" eventedindexingenabled="true" enablepriceindexing="true" enableinventoryindexing="true" hidefindadminscreens="true" dbconnectionstringname="EPiServerDB"> <engines> <engine languageid="en" enginename="Your_Engine_Name" apikey="Your_Api_Key" trackingkey="Your_Tracking_Key" databaseid="Your_Databaseid"></engine> <engine languageid="fr" enginename="Your_Engine_Name" apikey="Your_Api_Key" trackingkey="Your_Tracking_Key" databaseid="Your_Databaseid"></engine> </engines> </hawksearch>
<hawksearch> section has a series of attributes (presented in the table below) describing the general connector behavior. It also contains a nested <engines> section composed of <engine> elements.
<engine> section has a series of attributes (presented in the table below) specific to the Hawksearch engine, commonly identified by the language that engine operates on. This implementation is based upon the idea that every language has its own engine, each one of these engines being accessible from the Hawksearch Dashboard.
Configurations
General: <hawksearch> section
Attribute | Required | Default Value | Explanation |
---|---|---|---|
| No | ““ | Suffix of all Hawksearch indexes |
| No | false | If enabled, it will print the fields which have no correspondent in the Hawksearch engine, but were attempted to be indexed anyway. These ignored fields can be seen in the scheduled job’s message and logs |
| Yes | ““ | API Endpoint for Indexing (provided by Hawksearch) |
| Yes | ““ | API Endpoint for Searching (provided by Hawksearch) |
| Yes | ““ | Location of the dashboard (provided by Hawksearch) |
| No | ““ | API Endpoint for Event Tracking (provided by Hawksearch) |
| No | ““ | API Endpoint for Recommendations (provided by Hawksearch) |
| No | 600 | Minimum value: 1 |
| No | 125 | Minimum value: 1 Maximum value: 125 Hawksearch upper limit when indexing items |
| No | 125 | Minimum value: 1 Maximum value: 125 Hawksearch upper limit when indexing hierarchies |
| No | false | X-HawkSearch-IgnoreTracking |
| No | “VariantAttributesRollUp“ | Available values:
Determines the indexing strategy for product-variant relationships |
| No | true | If enabled, it will add any (specified) change to content (both CMS and Commerce) in the IndexingQueue table in order to be processed later by the Incremental Indexing Job. Note that incremental (delta) indexing will not be available if this is set to “false”. |
| No | false | If enabled, it will index the prices for entries that support pricing (such as variants or packages). For Variant as Separate Document indexing strategy, both variants and packages have their prices indexed out of the box. It will also add event handlers to register changes for prices in the IndexingQueue table |
| No | false | If enabled, it will index the inventories for entries that have inventories (such as variants or packages). |
| No | false | If enabled, it will hide the “Search & Navigation” menu item from the global menu. This menu item is visible if Optimizely Find (former EpiFind) is installed in the project |
| No | “EPiServerDB“ | The target database where the IndexingQueue table will be created. The table contains changes for content later picked up by the Incremental Indexing Job. If nothing is specified, the default CMS database will host this table |
Engine specific: <engine> section
Attribute | Required | Default Value | Explanation |
---|---|---|---|
| Yes | ““ | This field must be a 1:1 mapping to the Optimizely language the engine operates on. For instance, if your site language ids are “en” (English) and “fr” (French), then these will be used as the available values for this field |
| Yes | ““ | Name of the engine (provided by Hawksearch) |
| Yes | ““ | Engine’s API Key (provided by Hawksearch) |
| Yes | ““ | Engine’s Tracking Key (provided by Hawksearch) |
| Yes | ““ | Engine’s Database Id (provided by Hawksearch) |
Limitations
A Hawksearch Engine can’t be reused to store information for multiple languages!
Troubleshooting
If running [Hawksearch] Full Indexing Job from the Optimizely CMS → Admin interface results in following error:
double check the languageid
field(s) and make sure the 1:1 mapping between the Optimizely language and the Hawksearch engine is correct.