Azure search services
By default, in Sitefinity CMS search indexes are generated and stored locally using Lucene.NET search library. If your project resides on a cloud storage, you can use alternative search index generation and storage on external services - in the cloud on Azure Search or an external Elasticsearch server.
Setup Sitefinity CMS to use Azure Search
To communicate with Azure Search, Sitefinity uses Microsoft.Azure.Search.
To use Azure Search for Sitefinity's search indexes, perform the following:
- Follow the Azure Search documentation and create an instance of Azure Search at http://azure.microsoft.com/en-us/services/search/.
- After you have created the Azure Search service, to configure Sitefinity CMS to use it, you need the Service name and Admin API key.
- In Sitefinity CMS, navigate to Administration » Settings.
- Click Search.
- Under Which search service to use in your site?, select Azure Search.
- In Search service name, enter your Azure Search service name.
NOTE: Keep in mind that you need to enter only the name of the search service and not the whole URL. For example, if the URL is https://test.search.windows.net, you need to enter just test as search service name.
- In Admin API key, enter your Azure Search service API key.
- To test Sitefinity's connection with your Azure Search service, click Test connection.
- Click Save changes.
NOTE: Search results are ordered based on
@score parameter. This method returns relevance of the result for each search term. By using
@score parameter, the most relevant results come first.
For more information, see Azure Search libraries for .NET.
Search index fields and supported data types
When you add a search index to Azure Search, Sitefinity CMS creates by default the following fields:
: Do not add any of these fields as Additional fields for indexing
, because you will get a duplicate field
exception and will not be able to index.
You must specify the type of the additional fields for indexing according to the data type mapping provided in the following table.
|Azure Search data type
|Data and Time
|Numeric whole number (NumberWhole)
|Numeric decimal number (NumberDecimal)
|Yes / No
Scoring profiles in Azure search allow you to configure the way search results are ranked, based on one or more custom-defined criteria. They are part of the index definition and consist of weighted fields and functions.
Use weighted fields when you want to prioritize search results in a specific field. For instance, prioritize results that are in the Content or Title fields over other fields.
With functions, you can prioritize results by the time period they were published in, the numeric value of the results, or by tags. Sitefinity CMS supports the following functions:
For the tag function you also need to specify parameters. For more information, refer to Microsoft’s documentation Add scoring profiles to a search index.
Create scoring profiles
To create scoring profiles:
- Setup Sitefinity CMS to use Azure Search.
- Create a search index. For more information, see Create search indexes.
- Add scoring profiles in the Microsoft Azure portal. For more information, refer to Microsoft’s documentation Add scoring profiles to a search index.
- Configure the Search box widget by performing procedure Search box widget » Configure the Search box widget.
In Step 3, select the index you have created in Step 2 of this procedure.
IMPORTANT: When you use the Tag scoring function, you must add a Tags parameter in the Azure portal. When a Tags parameter is added to an index, you can configure these parameters in the advanced settings of the Search box widget. For more information, see Search box widget.