Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bala Gudibandla 12 posts 131 karma points
    Jun 12, 2017 @ 15:00
    Bala Gudibandla
    0

    Config errors with custom Snowball Analyzer in Examine

    I've followed the steps in

    https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/61148-Search-not-returning-expected-results#comment-230133

    to create custom analyzer, and setup config files but ended with the following config error on app startup:

    Server Error in '/' Application.
    Configuration Error
    
    Description: An error occurred during the processing of a
    configuration file required to service this request. Please review the
    specific error details below and modify your configuration file
    appropriately. 
    
    Parser Error Message: Value cannot be null. Parameter name: type
    
    Source Error: 
    
    Line 23:
    <add name="ExternalIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine" analyzer="LuceneNetContrib.EnglishSnowballAnalyzer,
    LuceneNetContrib"/> 
    

    ExamineSettings.config:

    <Examine>
      <ExamineIndexProviders>
          <providers>
              <add name="InternalIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"
                   supportUnpublished="true"
                   supportProtected="true"
                   analyzer="Lucene.Net.Analysis.WhitespaceAnalyzer, Lucene.Net"/>
    
              <add name="InternalMemberIndexer" type="UmbracoExamine.UmbracoMemberIndexer, UmbracoExamine"
                   supportUnpublished="true"
                   supportProtected="true"
                   analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"/>
    
              <!-- default external indexer, which excludes protected and unpublished pages-->
              <add name="ExternalIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"
                   analyzer="LuceneNetContrib.EnglishSnowballAnalyzer, LuceneNetContrib"/>
    
              <add name="PDFIndexer" type="UmbracoExamine.PDF.PDFIndexer, UmbracoExamine.PDF"
                   analyzer="LuceneNetContrib.EnglishSnowballAnalyzer, LuceneNetContrib"
                   extensions=".pdf"
                   umbracoFileProperty="umbracoFile"/>
          </providers>
      </ExamineIndexProviders>
    
      <ExamineSearchProviders defaultProvider="ExternalSearcher">
          <providers>
              <add name="InternalSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine"
                   analyzer="Lucene.Net.Analysis.WhitespaceAnalyzer, Lucene.Net"/>
    
              <add name="ExternalSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine" />
    
              <add name="InternalMemberSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine"
                   analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net" enableLeadingWildcard="true"/>
              <add name="PDFSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine"/>
              <add name="ContentSearcher" type="Examine.LuceneEngine.Providers.MultiIndexSearcher, Examine"
                   analyzer="LuceneNetContrib.EnglishSnowballAnalyzer, LuceneNetContrib" enableLeadingWildcards="true" indexSets="ExternalIndexSet,PDFIndexSet"/>
          </providers>
      </ExamineSearchProviders>
    
    </Examine>
    

    ExamineIndex.config:

    <ExamineLuceneIndexSets>
        <!-- The internal index set used by Umbraco back-office - DO NOT REMOVE -->
        <IndexSet SetName="InternalIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/Internal/"/>
    
        <!-- The internal index set used by Umbraco back-office for indexing members - DO NOT REMOVE -->
        <IndexSet SetName="InternalMemberIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/InternalMember/">
            <IndexAttributeFields>
                <add Name="id" />
                <add Name="nodeName"/>
                <add Name="updateDate" />
                <add Name="writerName" />
                <add Name="loginName" />
                <add Name="email" />
                <add Name="nodeTypeAlias" />
            </IndexAttributeFields>
        </IndexSet>
    
        <!-- Default Indexset for external searches, this indexes all fields on all types of nodes-->
        <IndexSet SetName="ExternalIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/External/" />
        <IndexSet SetName="PDFIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/PDFs"/>
    </ExamineLuceneIndexSets>
    

    Can someone please help?

    Thanks, Bala

  • Bala Gudibandla 12 posts 131 karma points
    Jun 19, 2017 @ 14:39
    Bala Gudibandla
    100

    Solved.

    Implemented it by creating a class in the same project instead of a new .dll.

Please Sign in or register to post replies

Write your reply to:

Draft