SearchCustomization defines search settings created in Search Manager: the search channel, participating objects and fields, and rules that filter search results. It configures search behavior; it does not define object permissions, field-level security, or record sharing.
The channel determines how profile and object selections apply. Einstein Global Search Bar configurations associate settings with user profiles, while LWR Experience Sites configurations use a selected-object list. The inherited fullName identifies the metadata component, and the required masterLabel names the configuration.
Key Elements
| Element | What the Element Controls |
|---|---|
fullName |
The metadata component's identity, inherited from the base metadata type. It is distinct from the configuration's label. |
masterLabel |
Required. The name of the configuration. |
channel |
Required. The search channel to which the configuration applies. GlobalSearch is an example value, not an exhaustive list of allowed channels. |
profile |
Identifies a user profile when the channel is Einstein Global Search Bar. |
selectedProfile |
A list of user profiles associated with the configuration when the channel is Einstein Global Search Bar. |
objectToAlwaysSearch |
A list of objects that are always searched for the associated user profile when the channel is Einstein Global Search Bar. |
selectedObject |
A list of objects selected in the configuration when the channel is LWR Experience Sites. |
objectOverride.objectApiName |
Required within each object override. Identifies the object being configured and establishes the object context for its field settings and rules. |
objectOverride.searchable |
Controls whether the object is searchable: true or false. |
objectOverride.fieldOverride.fieldApiName |
Required within each field override. Identifies the field whose searchability is being configured. |
objectOverride.fieldOverride.searchable |
Required within each field override. Controls whether the field is searchable: true or false. It does not configure field visibility or permissions. |
objectOverride.rule.fieldApiName |
Required within each rule. Identifies the field used to filter results, relative to the containing object's objectApiName. |
objectOverride.rule.operator |
Required within each rule. Specifies the comparison operator. Examples include eq, ne, and in; these examples are not a complete allowed-value list. |
objectOverride.rule.ruleValue.value |
Required within each rule value. Stores the comparison value as a string. A rule can contain multiple ruleValue entries. |
objectOverride.rule.ruleValue.targetObjectApiName |
Provides the target object's API name when the rule applies to a lookup field. |
Behavior and Constraints
Administrative access
Users need View Setup and Configuration to access this configuration and Customize Application to edit it. These permissions govern administration of the configuration, not the access of users whose search experience it configures.
Channel-specific selections
For Einstein Global Search Bar, selectedProfile identifies the associated profiles, and objectToAlwaysSearch lists objects that are always searched for those profiles. The singular profile element also identifies a user profile for that channel. For LWR Experience Sites, selectedObject lists the selected objects.
Do not apply the profile-specific meaning of objectToAlwaysSearch to every channel. Likewise, the example channel value GlobalSearch does not establish all supported channel values.
Object participation, field searchability, and filtering
Each objectOverride applies to the object named by objectApiName. It can contain three distinct controls:
-
searchabledetermines whether the object participates in search. -
fieldOverrideentries determine which fields are searchable. -
ruleentries filter the object's search results.
These settings answer different questions. Making a field searchable is not the same as using it in a result filter, and neither setting grants field access.
A rule combines a field, an operator, and one or more values. For example, an in rule on Account.Rating can contain separate values for Hot and Warm. The available examples do not establish a complete operator list or specify how multiple rules are combined.
ruleValue.value is serialized as a string even when the comparison concerns another data type. For example, a rule comparing the Boolean field Contact.DoNotCall can serialize its value as false.
For a lookup-field rule, distinguish the object being filtered from the lookup target. A rule on Contact.AccountId belongs to an override whose objectApiName is Contact, while its targetObjectApiName is Account.
Deployment and Retrieval
SearchCustomization components use the .searchCustomization suffix and reside in the searchCustomizations folder. In package.xml, use the type name SearchCustomization. The type supports the wildcard member * in the manifest.
The nested object overrides, field overrides, rules, and rule values are parts of the SearchCustomization component. They are not independently deployable metadata assets.
Dependency analysis must cover both searchable fields and filter fields. A field referenced only by rule.fieldApiName is still a dependency, even if it has no fieldOverride entry. Resolve both kinds of field reference against the containing objectOverride.objectApiName.
Object dependencies can also occur in objectToAlwaysSearch, selectedObject, and lookup-rule targetObjectApiName. Profile associations in selectedProfile reference Profile metadata. Do not substitute masterLabel for the component identity provided by fullName.
Relationships
The relevant connections are to objects, fields, and profiles. Field references require the enclosing object's context; a lookup rule can additionally reference a different object as its target.
References
-
CustomField:fieldApiName, in bothfieldOverrideandrule. -
CustomObject:objectApiName,objectToAlwaysSearch,selectedObject, andtargetObjectApiName. -
Profile:selectedProfile.
Common Questions
Where are SearchCustomization files stored, and can I retrieve them with a wildcard?
They are stored in the searchCustomizations folder with the .searchCustomization suffix. The SearchCustomization manifest type supports the wildcard member *.
Does setting a field to searchable grant users access to it?
No. fieldOverride.searchable controls field searchability, not field-level security. The configuration also does not define object permissions or record sharing.
Which fields count as SearchCustomization dependencies?
Both fieldOverride.fieldApiName and rule.fieldApiName reference fields. Resolve them against the containing objectOverride.objectApiName, including fields used only to filter results.
How do profile and object selections differ by search channel?
For Einstein Global Search Bar, selectedProfile identifies associated profiles and objectToAlwaysSearch identifies objects always searched for those profiles. The singular profile element also identifies a profile for that channel. LWR Experience Sites uses selectedObject for its selected-object list.
Can I deploy a SearchCustomization rule separately?
No. Rules and their values are nested parts of the SearchCustomization component, as are object and field overrides.