0

I am running an out-of-the-box XP 9.3 installation (using the Sitecore Community Docker images) and get the following Solr related error in the XConnect Indexworker:

2020-01-27 15:27:38.096 +01:00 [Error] An error occured during resuming a previous index rebuild process. There will be another attempt to check. The check interval after an error is 00:00:20.
Sitecore.Xdb.Collection.Search.Solr.Failures.SolrResponseException: {
  "responseHeader":{
    "status":400,
    "QTime":0,
    "params":{
      "q":"id:xdb-rebuild-status",
      "fl":"*,[child limit=1024]",
      "wt":"json"}},
  "error":{
    "metadata":[
      "error-class","org.apache.solr.common.SolrException",
      "root-error-class","org.apache.solr.common.SolrException"],
    "msg":"Parent filter should be sent as parentFilter=filterCondition",
    "code":400}}

   at    at Sitecore.Xdb.Collection.Search.Solr.SolrClient.EnsureSolrSuccessStatusCode(HttpResponseMessage response)
   at Sitecore.Xdb.Collection.Search.Solr.SolrClient.<SendGetRequestAsync>d__4.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.SolrWriter.<SendGetRequestAsyncWithRetries>d__21.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.SolrRebuildStatusStorage.<ReadStatus>d__6.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.Rebuild.IndexRebuildFlow.<TryToResumeRebuild>d__25.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.Rebuild.IndexRebuildFlow.RebuildStatusWatcher.<>c__DisplayClass5_0.<<Start>g__RunRebuildFlowCycle|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Sitecore.Xdb.Collection.Indexing.Rebuild.TaskExtension.<ExecuteWithInterval>d__0.MoveNext()
...

Any clues?

  • The fl parameter in the query to search the nested child documents is missing the mandatory parentFilter parameter, and so Solr is returning a Bad Request response (github.com/apache/lucene-solr/blob/master/solr/core/src/java/…). Can you share the full detailed error exception to see where this request originates in the XConnect indexworker code? – Alessandro Faniuolo Jan 27 at 17:10
  • @AlessandroFaniuolo added the full stacktrace. – Joost Jan 28 at 7:15
1

I am able to reproduce this issue if I delete the <field name="_nest_path_" type="_nest_path_" /> field definition in the managed-schema.xml file for the xdb and the xdb_rebuild indexes.

The schema for these two indexes is supposed to be nested. According to Solr documentation for the [child] transformer, when using this transformer, the parentFilter parameter must be specified unless the schema declares _nest_path_. In this case, since the xdb and the xdb_rebuild indexes are supposed to be nested, the parentFilter parameter can be omitted in the queries.

The XConnect indexworker queries the status of the rebuild task invoking the Sitecore.Xdb.Collection.Search.Solr.SolrRebuildStatusStorage.ReadStatus() task. In this task, the internal GetJsonSearchByIdUri method is invoked to build the Solr search request uri. This code assumes that the Solr index is nested and indeed the parentFilter parameter is not used:

internal static Uri GetJsonSearchByIdUri(Uri uri, string id, bool includeChildren)
{
    string str1 = "id:" + Uri.EscapeDataString(id);
    string str2 = includeChildren ? "&fl=*,[child%20limit=1024]" : string.Empty;
    return new Uri(uri, "select?wt=json&q=" + str1 + str2);
}

It seems that the managed-schema.xml for the xdb and the xdb_rebuild indexes in your Solr docker container might be corrupted.

| improve this answer | |
  • A manual rebuild does not solve it. The xdb Solr cores are both empty, except for one document in xdb: {"id":"xdb-rebuild-status","progresscurrent_d":0.0, "rebuildstate_l":1, ...}. Starting with fresh Solr cores results in the same problem. – Joost Jan 29 at 8:00
  • How did you trigger the rebuild process? Invoking the rebuild request command ("XConnectSearchIndexer -r” command) or manually posting a rebuild document? – Alessandro Faniuolo Jan 29 at 12:20
  • I used "XConnectSearchIndexer -rr" – Joost Jan 29 at 12:31
  • @Joost I rewrote my answer since I stated something incorrect before. – Alessandro Faniuolo Jan 30 at 2:34
  • That solves it; I got the wrong the xdb Solr schema (v9.2) without the "_nest_path". NB. Not a Sitecore Docker XP related issue, my fault of re-using Solr cores from disk. – Joost Jan 30 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.