Error when using Sitecore.ContentSearch.LuceneProvider.SwitchOnRebuildLuceneIndex
As we migrate over, we've ended up with a few Lucene indexes of type:
The indexes configurations have been swtiched over to:
configuration type="Coveo.SearchProvider.Configuration.CoveoSearchConfiguration, Coveo.SearchProvider"
When those index rebuilds are triggered via publish the following error occurs.
ManagedPoolThread #18 15:30:11 INFO Job started: Index_Update_IndexName=rebrand_web ManagedPoolThread #18 15:30:11 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 (Object , Object ) at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at Sitecore.Jobs.Job.ThreadEntry(Object state) Nested Exception Exception: System.InvalidOperationException Message: Index has not been initialized. Source: Sitecore.ContentSearch.LuceneProvider at Sitecore.ContentSearch.LuceneProvider.SwitchOnRebuildLuceneIndex.CreateFullRebuildContext() at Sitecore.ContentSearch.LuceneProvider.LuceneIndex.PerformRebuild(IndexingOptions indexingOptions, CancellationToken cancellationToken) at Sitecore.ContentSearch.LuceneProvider.LuceneIndex.Rebuild()
Normal "LuceneIndex" type indexes function as expected. I haven't decompiled the code to have a look. Any ideas of the fix?
I'm not sure of what you are trying to achieve here:
- Convert the Lucene index to a Coveo index
- Keep the Lucene index side by side with the other Coveo indexes
If you are trying to convert it, you're missing a few steps such as changing the type of the
<index> element. If you are trying to run it side by side, I don't think you need to change the type of the
<configuration> element. Take a look to the 2 documentation links.