Lucene changes introduced with product updates

Overview

This article describes changes to the default Lucene search service that are introduced with Sitefinity CMS product updates and the actions you must take after you upgrade.

Sitefinity CMS 15.4.8640

As of Sitefinity CMS 15.4.8640, the way Sitefinity CMS indexes and queries data in Lucene is changed. This change brings the following capabilities to Lucene:

  • Search facets – Lucene now supports search facets, in addition to Elasticsearch and Azure AI Search. For more information, see Search facets and Search facets widget.
  • Filter expressions – You can use filter expressions in the Search box widget to narrow down search results. For more information, see Filter expressions.

IMPORTANT: After you upgrade to Sitefinity CMS 15.4.8640 or later, you must reindex all Lucene search indexes. Until you reindex, search is not fully functional.

Reindex after the upgrade

If your project uses Lucene as the search service, the upgrade marks all active search indexes as requiring a reindex. Until the indexes are reindexed, the Dashboard displays a Search reindexing required warning, which lists the indexes that you must reindex.

To reindex your search indexes:

  1. In the Sitefinity CMS backend, navigate to Administration » Search indexes. You can also click the Go to Search indexes link in the warning on the Dashboard.
  2. Click the Actions link of the index and then click Reindex.
    You can reindex multiple search indexes simultaneously.
  3. Repeat the procedure for each index listed in the warning.

For more information about reindexing, see Create search indexes.

Maximum length of indexed values

To support exact filtering and sorting, Lucene stores a non-analyzed copy of the field values. Values longer than the maximum length (256 characters by default) are truncated in this copy, so exact filters and sorting take into account only the first characters up to that limit.

To change the maximum length:

  1. In the Sitefinity CMS backend, navigate to Administration » Settings » Advanced » Search » Search Services » LuceneSearchService.
  2. Expand the Parameters node and click MaxDocValueLength.
  3. In the Value field, enter the maximum number of characters.
    The default value is 256.
  4. Click Save changes.
  5. Reindex your Lucene search indexes.

Upgrade notes

  • The reindex requirement applies only when the current search service is Lucene. Projects that use Azure AI Search or Elasticsearch are not affected.
  • If you use Sitefinity CLI to upgrade your project, see Upgrade using Sitefinity CLI.
Want to learn more?
Enhance your Sitefinity skills by enrolling in free training sessions. Become Sitefinity certified through Progress Education Community to strengthen your professional credentials.