Tag: Lucene

  • Unable to create document builder – crawling exception after upgrading to SC 7.2

    After upgrading to Sitecore 7.2 I ran into this exception in the crawling log when trying to index PDF documents:
    Unable to create document builder (). Please check your configuration. We will fallback to the default for now.

    The solution was to add the document builder type to my custom index configuration:

    <documentBuilderType>Sitecore.ContentSearch.LuceneProvider.LuceneDocumentBuilder, Sitecore.ContentSearch.LuceneProvider</documentBuilderType>

    After that, reading PDF content through my iFilter provider worked fine again.

  • NullReferenceException in custom Index after upgrading to Sitecore 7.2

    After upgrading to Sitecore 7.2 we got the following exception when trying to build our custom indexes:

    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
     at Sitecore.ContentSearch.LuceneProvider.LuceneIndex.Reset()
     at Sitecore.ContentSearch.LuceneProvider.LuceneIndex.PerformRebuild(IndexingOptions indexingOptions, CancellationToken cancellationToken)
     at Sitecore.ContentSearch.LuceneProvider.LuceneIndex.Rebuild()
     --- 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 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)
    

    The resolution to this is quite simple. Sitecore has included <initializeOnAdd> to the index configuration. If this field is missing in the configuration, building the index fails. Just make sure you have the following line to your custom index configuration:

    <myCustomIndexConfiguration type="Sitecore.ContentSearch.LuceneProvider.LuceneIndexConfiguration, Sitecore.ContentSearch.LuceneProvider">
    
    <indexAllFields>true</indexAllFields>
    
    <!-- Needed since SC7.2 -->
    <initializeOnAdd>true</initializeOnAdd>
     ....