Index error when deleting a Sitecore item
When we delete a Sitecore item it is properly removed from the acproductsmaster index, but not the target site indexes (acproductswebindex and acproductspubindex). In the log file, we see the following error. Any idea what might cause this issue?
ManagedPoolThread #17 16:54:04 INFO Job started: Index_Update_IndexName=ac_products_pub_index ManagedPoolThread #17 16:54:04 ERROR Exception Exception: System.Reflection.TargetInvocationException Message: Exception has been thrown by the target of an invocation. Source: mscorlib 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 System.Reflection.MethodBase.Invoke(Object obj, Object parameters) at Sitecore.Jobs.JobRunner.RunMethod(JobArgs args) at (Object , Object ) at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at Sitecore.Jobs.Job.ThreadEntry(Object state) Nested Exception Exception: System.NullReferenceException Message: Object reference not set to an instance of an object. Source: Coveo.SearchProviderBase at Coveo.SearchProvider.ProviderIndexBase.Initialize(IIndexDocumentPropertyMapper`1 p_DocumentTypeMapper) at Coveo.SearchProvider.ProviderIndex.Initialize() at Coveo.SearchProvider.ProviderIndex.CreateUpdateContext() at Sitecore.ContentSearch.AbstractSearchIndex.PerformUpdate(IEnumerable`1 indexableInfo, IndexingOptions indexingOptions)
Normally, deleting an item in a Sitecore database only triggers the removal of its associated indexed documents in the Sitecore indexes that crawl this database. So deleting your item in the master database should only remove it from your acproductsmaster index.
Normally, the indexed documents are removed from the other Sitecore indexes (web, pub…) only when the site (or deleted item parent sub-tree) is published in those databases.
Maybe the error you see in the logs is not related to the delete operation. Maybe it's a false positive error (see Coveo with Sitecore not indexing web database).
- Did you have a look at your Coveo Diagnostic Page? Are all components status green?
- Did you have a look at other questions with the same error and similar stack trace?
- Does the indexed documents are removed from the other Sitecore indexes when you publish the site?