Sitecore Error Troubleshooting: Experience profile search issue (Upgrade from sitecore 10.1 to 10.4)



Error Message
=========================================================================
2025-02-12 09:50:23.772 +02:00 [Error] [XdbContextLoggingPlugin] XdbContext Operation Exception, Operation #0, Batch #dfa1c9e8-dfaa-4148-9834-83ffe31444ae, Sitecore.XConnect.Operations.XdbSearchOperation`1[Sitecore.XConnect.Contact]: Sitecore.Xdb.Collection.Search.Solr.Failures.SolrResponseException: {
"responseHeader":{
"status":400,
"QTime":0,
"params":{
"fl":"id",
"cursorMark":"*",
"json":"{\"query\":\"(x_type_s:(\\\"ContactDataRecord\\\") AND (((facets.personal.firstname_s:(\\\"test\\\") OR facets.personal.lastname_s:(\\\"test\\\")) OR facets.emails.preferredemail.smtpaddress_s:(\\\"test\\\")) OR textmatch:(test)))\",\"sort\":\"facets.engagementmeasures.mostrecentinteractionstartdatetime_dt desc,id asc\"}",
"q.op":"and",
"rows":"20",
"wt":"json"},
"error":{
"metadata":[
"error-class","org.apache.solr.common.SolrException",
"root-error-class","org.apache.solr.common.SolrException"],
"msg":"undefined field textmatch",
"code":400}

at Sitecore.Xdb.Collection.Search.Solr.SolrClient.EnsureSolrSuccessStatusCode(HttpResponseMessage response)
at Sitecore.Xdb.Collection.Search.Solr.SolrReader.<ExecuteQuery>d__20`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Sitecore.Xdb.Collection.Search.Solr.TaskRetryHelper.<ExecuteTaskWithRetryAsync>d__0`2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Sitecore.Xdb.Collection.Search.Solr.TaskRetryHelper.<ExecuteTaskWithRetryAsync>d__0`2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Sitecore.Xdb.Collection.Search.Solr.SolrReader.<GetSearchResults>d__19`2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Sitecore.Xdb.Collection.Search.Solr.SolrReader.<SearchContacts>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Sitecore.Xdb.Collection.Indexing.IndexReaderCountersDecorator.<SearchContacts>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Sitecore.Xdb.Collection.Repository.<SearchContacts>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Sitecore.Xdb.Collection.RepositoryCountersDecorator.<SearchContacts>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Sitecore.XConnect.Service.RepositorySearchInvoker.<Execute>d__9.MoveNext()


===============================================================================

The above message  I got while doing a search in Sitecore Experience  profile page while upgrading from sitecore 10.1 to sitecore 10.4. 

===============================================================================

Cause of the error:
if you see the above  log ,there is a field "textmatch:(test)".These errors  occur if the "textmatch" field is missing from the xDb index schema.


Solution:
Replace the currently used "managed-schema" files in xDB and xDB rebuild index with default one (from a 10.4 instance).

Once its done. Restart the Solr and perform Solr rebuild index


Comments

Popular posts from this blog

Solrcloud With Zookeeper -Single server setup

Render Sitecore Experience Forms Using Sitecore XP 10.4 with a Headless Approach (Next.js + JSS SDK)

Next.js with XM Cloud EDGE and GraphQL