Sitecore 8.1 and Solr6.6.0 error while rebuilding the search index.

Hi guys, i'm facing with an error message while i'm trying to Rebuild search index.

I'm using Sitecore8.1 and Solr 6.6.0,

Hope someone can help me this this issue, thank you !!!


Error message


Job started: Index_Update_IndexName=sitecore_web_index|#Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> SolrNet.Exceptions.SolrConnectionException: <?xml version="1.0" encoding="UTF-8"?>
<lst name="responseHeader"><int name="status">400</int><int name="QTime">1</int></lst><lst name="error"><lst name="metadata"><str name="error-class">org.apache.solr.common.SolrException</str><str name="root-error-class">java.time.format.DateTimeParseException</str></lst><str name="msg">Invalid Date in Date Math String:'2015-11-12T09.28.37Z'</str><int name="code">400</int></lst>
 ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.
   at System.Net.HttpWebRequest.GetResponse()
   at HttpWebAdapters.Adapters.HttpWebRequestAdapter.GetResponse()
   at SolrNet.Impl.SolrConnection.GetResponse(IHttpWebRequest request)
   at SolrNet.Impl.SolrConnection.PostStream(String relativeUrl, String contentType, Stream content, IEnumerable`1 parameters)
   --- End of inner exception stack trace ---
   at SolrNet.Impl.SolrConnection.PostStream(String relativeUrl, String contentType, Stream content, IEnumerable`1 parameters)
   at SolrNet.Impl.SolrConnection.Post(String relativeUrl, String s)
   at SolrNet.Impl.SolrBasicServer`1.SendAndParseHeader(ISolrCommand cmd)
   at Sitecore.ContentSearch.SolrProvider.SolrBatchUpdateContext.AddRange(IEnumerable`1 group, Int32 groupSize)
   at Sitecore.ContentSearch.SolrProvider.SolrBatchUpdateContext.Commit()
   at Sitecore.ContentSearch.SolrProvider.SolrSearchIndex.PerformRebuild(Boolean resetIndex, Boolean optimizeOnComplete, IndexingOptions indexingOptions, CancellationToken cancellationToken)
   at Sitecore.ContentSearch.SolrProvider.SolrSearchIndex.Rebuild(Boolean resetIndex, Boolean optimizeOnComplete)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj)
   at Sitecore.Jobs.JobRunner.RunMethod(JobArgs args)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Jobs.Job.ThreadEntry(Object state)


  • It seems date time format is not correct for any of your dynamic field. Solr only support yyyy-MM-dd'T'HH:mm:ss'Z' date time format. Please check with your custom configurations what Date time format you applied on that.

    Did you indexing any of your custom date time field if yes what date time format you are providing to that?
  • In reply to Yogesh Sharma:

    Thanks for the response Mr. Yogeshwer Sharma

    I'm new to Sitecore, do not know exactly how the indexes were set up, but I have not done any custom indexing at all.

    It's very strange that a colleague of mine has just done that together, but he got reindexing.
    Does it have anything to do with the computer itself?
  • In reply to Nattaphong Klinjan:

    It's nothing to do with Computer....only thing is Solr should be installed on machine. Please copy schema.xml from your colleague machine to your solr set up and check if it works for you. I think you are missing with any of the step.
  • Solr 6.6.0 Uses Managed Schema by Default and if you would like to switch to manually editing a schema.xml file, you should take the following steps:

    1. Rename the managed-schema file to schema.xml
    2. Modify solrconfig.xml to replace the schemaFactory class.
    a. Remove any ManagedIndexSchemaFactory definition if it exists

    <!-- An example of Solr's implicit default behavior if no schemaFactory is explicitly defined.-->
    <schemaFactory class="ManagedIndexSchemaFactory">
    <bool name="mutable">true</bool>
    <str name="managedSchemaResourceName">managed-schema</str>

    b. Add a ClassicIndexSchemaFactory definition as shown below

    <schemaFactory class="ClassicIndexSchemaFactory"/>

    3. Reload the core(s).

    Ravindra Giri
  • In reply to Yogesh Sharma:

    Hi, I've tried your suggestion, but it still does not work. It is very strange that it will not work.
  • In reply to Ravindra Giri:

    Hi Ravindra

    The solrconfig.xml file already looks correct, it has <schemaFactory class="ClassicIndexSchemaFactory"/> already and without <schemaFactory class="ManagedIndexSchemaFactory">
  • In reply to Nattaphong Klinjan:

    Is it possible this is a system language culture issue? Since you mentioned a colleague has it working, I am wondering if a language culture on your machine is causing the date to be exported in a different format

  • In reply to Yogesh Sharma:

    I agree with Yogesh. It is using a dot instead of what should be a colon for the separator between hours, minutes and seconds. I'd check your SOLR logs and see if you can pinpoint which field it is having a problem with. You also might find additional information in the Sitecore crawling logs.

  • Problem solved by inserting patch ! Patch: Sitecore.Support.178247.config 

    Patch contain somthing like ...
    <converter handlesType="System.DateTime" typeConverter="Sitecore.ContentSearch.Converters.IndexFieldUTCDateTimeValueConverter, Sitecore.ContentSearch" set:typeConverter="Sitecore.Support.ContentSearch.Converters.IndexFieldUTCDateTimeValueConverter, Sitecore.Support.178247"/>

  • In reply to Nattaphong Klinjan:

    Can you please share Sitecore.Support.178247.dll? Having same issue and stuck for this patch.
  • In reply to Ashish Patel:

    Here is the patch link:

    You can look for the patch number in this repository, so you can find many more.
  • Hi,
    Have you populated the managed schema if not then please populate the managed schema and after that add your custom changes in the solr schema file if there is any. And after that try to rebuild the index.

  • In reply to Jason St-Cyr:

    We just ran into this same issue. And after some debugging, determined that our Norway localized website was causing these Solr errors. This only started happening when we upgraded from Windows 2008R2 servers. Those don't have this issue.

    I notice that when I do <%Response.Write(DateTime.Now.ToUniversalTime().ToString());%>, the time value has periods instead of semicolons. But when I check the TimeSeparator value for the nn-NO language in powershell, I am told it is ":".

    I wish I knew where this was being set incorrectly at a system level, because I imagine we will run into more things than just Solr that will not like the date/time formatting.
  • In reply to Chris Pauly:

    A little more searching and I see that this has been an issue since Windows 10... and it has been reported, but never addressed by Microsoft.