In this article you will find:
Goal
The Sitefinity connector provides a mechanism for notifying data sources for the start of the indexing procedure. This way, you can use multiple sources to add items to the Hawksearch index created by Sitefinity.
Prerequisite
Configured Connector - Connector: Applying Settings
Add additional data sources
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.
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.
You can set the status to either “success” or “fail” depending on the indexing result.
METHOD: PUT { "RequestId":"558ad504-9b2d-4b67-be4f-7ab9ed3028fb", "IndexName":"hawksearchindexname.20201020.112252.suffix", "Action":"all", "Status":"successful", "ObjectType":"status", "Message":"Rebuild Hawksearch Index finished successfully" }