In this article you will find:
...
You can add additional data sources from Advanced Settings → Hawksearch -> DataSources submenu (your-site-domain/Sitefinity/Administration/Settings/Advanced). You should provide the Data Source with Name, Api Key, Url, Severity and Timeout interval.
Name - provide unique name for the data source
Api Key - provide a unique Api Key
Url - the Hawksearch connector will use this Url to send a POST request to the data source
Severity - the values for severity are “Low” and “Critical”.
Timeout interval - you can set a timeout interval for each data source.
Setup data source service
The Data Source must expose a POST endpoint, which will receive and object with RequestId and IndexName from the request body.
Code Block |
---|
METHOD: POST
{
"RequestId": "558ad504-9b2d-4b67-be4f-7ab9ed3028fb",
"IndexName": "hawksearchindexname.20201020.112252.suffix"
} |
When the indexing process is completed, the service must send a PUT request to your-site-domain/hawk/index/status containing the RequestId and the IndexName received from the first request, and Status which notifies if the indexing is successful or failed.
Note |
---|
You can set the status to either “success” or “fail” depending on the indexing result. |
...
Workflow
When reindexing is triggered from Sitefinity, the connector will notify an external indexing service by sending the Hawksearch index name and the Api Key.
There are different workflows based on Data Source severity:
Low Severity - if Low Severity external data source fails its indexing, the indexing procedure will continue as usual.
Critical Severity
Deferred Index activation is active - while deferred index activation is active the connector will create the new index while preserving the old one so there is no downtime as the indexes are swapped. If Critical Severity data source fails its indexing or the Timeout interval is exceeded the newly created index will be removed and the system will continue using the old one.
When reindexing is triggered by Sitefinity, the connector will notify an external indexing service by sending the Hawksearch index name and the Api key.
There are different workflows based on the severity of the data source:
Low Severity:
Success - the indexing procedure will continue as usual and the index data status will be updated.
Fail - the indexing procedure will continue as usual and the index data status will be updated.
Critical Severity
Success - if Critical Severity data source finish indexing successfully, the indexing procedure will continue as usual.
Fail:
Deferred Index Activation is disabled - the indexing procedure will continue as usual and the index data status will be updated.
Deferred Index Activation is enabled - while Deferred Index Activation is enabled, the connector will create the new index while keeping the old one so that there is no downtime while the indexes are swapped. If the Critical Severity data source fails to index or the Timeout interval is exceeded, the newly created index will be removed and the system will continue to use the old one.