Add config so it is configurable whether to explicitly index each nested property (#14648)

* Added new configuration "Umbraco:CMS:Examine:ExplicitlyIndexEachNestedProperty" that can be used to avoid nested properties like block grid to index each property individually.

* Moved the setting "Umbraco:CMS:Examine:ExplicitlyIndexEachNestedProperty" to "Umbraco:CMS:Indexing:ExplicitlyIndexEachNestedProperty" to make it more future proof

* Added missing registration

* Fixed registration

* Small readability improvement

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
This commit is contained in:
Bjarke Berg
2023-08-09 11:47:45 +02:00
parent cae22a6b9f
commit 945e3be553
8 changed files with 114 additions and 11 deletions

View File

@@ -0,0 +1,18 @@
using System.ComponentModel;
namespace Umbraco.Cms.Core.Configuration.Models;
/// <summary>
/// Typed configuration options for index creator settings.
/// </summary>
[UmbracoOptions(Constants.Configuration.ConfigIndexing)]
public class IndexingSettings
{
private const bool StaticExplicitlyIndexEachNestedProperty = true;
/// <summary>
/// Gets or sets a value for whether each nested property should have it's own indexed value. Requires a rebuild of indexes when changed.
/// </summary>
[DefaultValue(StaticExplicitlyIndexEachNestedProperty)]
public bool ExplicitlyIndexEachNestedProperty { get; set; } = StaticExplicitlyIndexEachNestedProperty;
}