Generate and store search indexes in the cloud

Overview

By default, in Sitefinity CMS search indexes are generated and stored locally using Lucene.net search service. 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 5.0.0

To use Azure Search for Sitefinity's search indexes, perform the following:

  1. Follow the Azure Search documentation and create an instance of Azure Search at http://azure.microsoft.com/en-us/services/search/.
  2. After you have created the Azure Search service, to configure Sitefinity CMS to use it, you need the Service name and Admin API key.
  3. In Sitefinity CMS, navigate to Administration » Settings.
  4. Click Search.
  5. Under Which search service to use in your site?, select Azure Search.
  6. 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.

  7. In Admin API key, enter your Azure Search service API key.
  8. To test Sitefinity's connection with your Azure Search service, click Test connection.
  9. 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

IMPORTANT: When you add a search index to Azure Search, Sitefinity CMS creates by default the following fields:
  • Content
  • ContentType
  • Id
  • IdentityField
  • Language
  • LastModified
  • Link
  • OriginalItemId
  • PipeId
  • Provider
  • PublicationDate
  • Summary
  • Title

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.

Setup Sitefinity CMS to use Elasticsearch

PREREQUISITES: You must use Elasticsearch server version 7.5.1.

To use an Elasticsearch server for Sitefinity's search indexes:

  1. In Sitefinity CMS, navigate to Administration » Settings » Search.
  2. Under Which search service to use in your site?, select the Elasticsearch radio button.
  3. In Elasticsearch URL, enter the address and port of your Elasticsearch server.
  4. If the Elasticsearch client is using authentication, you must also configure the following properties. If no authentication is configured for the Elasticsearch, leave the following fields blank:
    • Elasticsearch Username
    • Elasticsearch Password
      The password is encrypted and is displayed as any other password in the browser. 
  5. Click Save changes.
NOTE: Highlighting in Elasicsearch 7.5.1. is limited to 1,000,000 text characters. To increase this limit you must make a PUT request with following code: 
PUT /<index_name>/_settings
{ "index" : { "highlight.max_analyzed_offset" : 10000000 } }
.

Additional resources

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?