Connect SmartHub to the Azure Cognitive Search Backend
The following topics describe how to add an Azure Cognitive Search backend The search engine your SmartHub instance uses to perform queries. SmartHub can be configured to use more than one search engine. to your instance of SmartHub.
How to Configure the Azure Cognitive Search Backend
Use the follow instructions to configure an Azure Cognitive Search backend.
- Open a web browser and navigate to your SmartHub Administration page at http://<SmartHubAddress>/_ADMIN.
-
Create a New Backend (see link next to "Main Backend").
-
Name the backend and select the "AzureBackend" type from the drop-down list.
-
Set the following configuration parameters:
Parameter Required/Optional Description Search Service Name
Required
Name of an existing search service in Azure to connect to Search Service DNS The system that converts website domain names (hostnames) into numerical values (IP address) so they can be found and loaded into your web browser. Suffix Optional The DNS suffix of the search service.
-
If left empty the default value is used: search.windows.net
API key
Required
An API key which has at least read access to the search service Index Name
Name of the index in search service to query Search Fields
A comma-delimited list of searchable fields.
-
The query runs only against these fields.
-
Hit-highlighting is automatically enabled for the fields in this list.
Ratings Sort Field Name of a column in the search index, which is used to sort documents when the rating is enabled.
-
Default value: escbase_lastupdateutc
Minimum Index Coverage Name of a column in the search index, which is used to indicate the percentage of the index that must be available to service the query before it can be reported as a success
-
Default value: 100
Scoring Profile Optional
Name of an existing Scoring Profile created for the used index.
-
For more information about Azure Scoring Profile see here.
-
How to configure a Scoring Profile in Azure, you can find below.
Fields with Manual Highlight Optional Names of the columns in the search index for which the highlight is done manually, without truncating the original value.
The properties should be separated by comma.
Default value:
escbase_title
When using a field that does not exist in the Azure index as a Filter or as a Sort option, the field will be ignored by the query.
Searching for a field that does not exist or applying a filter that has no corresponding field in the Azure index returns 0 results.
How to Boost Results Using a Date Property and Scoring Profile
- Go to your Azure Cognitive Search Service
- Click on Overview → Indexes
- Select your index that will be used also in SmartHub
- Select Scoring Profiles → Add scoring profile
- Enter a scoring profile name and click "Add scoring profile"
- Click Add functions → Add Scoring function
- From "Function type" dropdown, select Freshness
- Choose Field name for boosting
- Choose interpolation (Required for scoring functions. Defines the slope for which the score boosting increases from the start of the range to the end of the range.)
- Choose Boost value (Required for scoring functions. A positive number used as multiplier for raw score. It cannot be equal to 1.)
- Choose Boosting duration (Sets an expiration period after which boosting will stop for a particular document.)
- The Boosting duration must be formatted as an XSD "dayTimeDuration" value.
- Example: "P1D" (1 day), "PT15M" (15 minutes)
- Click Ok → Save
-
Pipeline Stages
Two stages are automatically added to both the Query and Results pipeline stages for the new Azure backend (shown in the graphic below):
- Range Facets
- Property Mapper
-
Modify the Property Mapper stage configuration by assigning search index field to the properties used by default by the SmartHub user interface.
Tip: Important! In the Property Mapper the property "Rank" must be mapped to the property "_score".
Example:Rank,_score;
By default, logs appear in the directory <SmartHub_Install_Directory>\Logging.