Skip to content

SearchSettingsPart SearchFields property is overwritten when multiple recipes add search fields #8835

@I3undy

Description

@I3undy

When defining SearchSettingsPart settings through recipes, the SearchFields property is overwritten instead of merged when multiple recipes attempt to add search fields for different indexes.
This results in losing previously defined search fields if a later recipe sets its own.

Steps to reproduce the behavior

  1. Create a recipe that adds the following SearchFields:
<SearchSettingsPart SearchFields="
    Admin:
    UserPart.Email,
    UserPart.FirstName,
    UserPart.LastName" 
    DisplayType="Summary" FilterCulture="false" SearchIndex="" />
  1. Create another recipe that adds:
<SearchSettingsPart SearchFields="
    UserSearch:
    UserPart.UserName,
    UserPart.Email,
    UserPart.RegistrationStatus,
    UserPart.CreatedUtc,
    UserPart.LastLoginUtc,
    UserRolesPart.Roles" 
    DisplayType="Summary" FilterCulture="false" SearchIndex="" />
  1. Execute both recipes.

Expected behavior
Both Admin and UsersReport search fields should coexist after applying both recipes.

Actual behavior
The last applied recipe overwrites the previous SearchFields settings. Only the fields from the latest recipe are present.

The SearchFields is treated as a single text field and fully replaced rather than merged by the index name. Ideally, the system should merge entries or provide a way to append settings without overwriting previous ones.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions