Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

In this article you will find:

Table of Contents

Goal

The Sitefinity connector provides a mechanism for notifying external 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.

Enable indexing from external data source

In order to activate this functionality you will need to select Enable Indexing From External Data Source checkbox in

Prerequisite

Info

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

Add additional data sources

After enabling the functionality you will need to create a new External Service. You can do that from Advanced Settings → Hawksearch -> ExternalServices submenu. You should provide the External Service with Source Id, Name and Url. The Url value will be used from Sitefinity to send a request at the external service.

Setup external indexing service

The External Service must expose a POST endpoint, which will receive and object with Id and IndexName from the request body.

Code Block
METHOD: POST
{
  "Id": "558ad504-9b2d-4b67-be4f-7ab9ed3028fb",
  "IndexName": "hawksearchindexname.20201020.112252.suffix"
}

When the indexing process is completed, the service must send a PATCH request to your-site-domain/external-data/indexes/status containing the service Id received in the first request.

Code Block
METHOD: PATCH
{
  "Id": "558ad504-9b2d-4b67-be4f-7ab9ed3028fb"
}

...

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: the key has no restrictions. Can contain letters, characters and numbers.

  • 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”. Based on this severity the indexing workflow will have different result.

  • Timeout interval - you can set a timeout interval for each data source. If the timeout interval is exceed the workflow for failed data source will be executed.

Example:

...

Workflow

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.