When requesting an item with a text field using the Equals (EQ) operator, it works as the Contains operator for text fields. The issue is related to the Edge (Preview) schema and the fact that all text fields in the Solr index are tokenized by default.
This issue affects Sitecore XP and SitecoreAI.
To resolve the issue, take the following steps:
To resolve the issue, take the following steps:
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore>
<contentSearch>
<indexConfigurations>
<defaultSolrIndexConfiguration>
<documentOptions type="Sitecore.ContentSearch.SolrProvider.SolrDocumentBuilderOptions, Sitecore.ContentSearch.SolrProvider">
<fields hint="raw:AddComputedIndexField">
<field fieldName="_customName" returnType="lowercaseString" type="Sitecore.Services.GraphQL.EdgeSchema.ComputedFields.CustomNameComputedField, Sitecore.Services.GraphQL.EdgeSchema" />
</fields>
</documentOptions>
</defaultSolrIndexConfiguration>
</indexConfigurations>
</contentSearch>
<api>
<GraphQL>
<setFieldMapping type="Sitecore.Services.GraphQL.EdgeSchema.Services.SearchQueryFieldMapping.FieldMapping, Sitecore.Services.GraphQL.EdgeSchema">
<fieldMapping hint="list:AddFieldMapping">
<fieldMappingModel fieldName="_name" type="Sitecore.Services.GraphQL.EdgeSchema.Services.SearchQueryFieldMapping.FieldMappingModel, Sitecore.Services.GraphQL.EdgeSchema">
<fieldName>_name</fieldName>
<mappingField>_customname</mappingField>
</fieldMappingModel>
</fieldMapping>
</setFieldMapping>
</GraphQL>
</api>
</sitecore>
</configuration>
Note: The _name field can still be used in search queries. However, it will be internally mapped to _customname.