Copied to clipboard

Flag this post as spam?

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


  • Lars 66 posts 136 karma points
    Apr 22, 2015 @ 16:20
    Lars
    0

    Search function throwing an error

    Hi. I am trying to build a Search function in Umbraco 7. I try to follow the guide at http://sleslie.me/2014/search-umbraco-using-examine-and-razor/.

    In my ExamineIndex.config I use this code

    <ExamineLuceneIndexSets>

          <!-- Default Indexset for external searches, this indexes all fields on all types of nodes-->
      <IndexSet SetName="ExternalIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/External/" />

      <!--MY ADDED CODE-->
      <IndexSet SetName="ContentSearch" IndexPath="~/App_Data/TEMP/ExamineIndexes/MySearch/" />

    </ExamineLuceneIndexSets>

    -----------------

    In the ExamineSettings.config I have:

    <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"/>
         
          <!-- index provider til index-->
          <add name="MySearchIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"
           supportUnpublished="false"
           supportProtected="true"
           interval="10"
           analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"
           indexSet="MySearch"/>
         
        </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"/>

          <!-- search provider til search-->
          <add name="MySearchSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine"
          analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net" indexSet="MySearch" enableLeadingWildcards="true"/>

        </providers>
      </ExamineSearchProviders>

    </Examine>

    ----------------

    Running Umbraco throws the following error:

    Browse and find ExamineManager.cs

    -------------------

    From here on I don't know what to do. Can someone help me or tell me if there is a search package for Umbraco 7

    Thanks in advance for any help!

    /Lars

     

     

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 22, 2015 @ 17:39
    Dave Woestenborghs
    1

    You have named your index set ContentSearch in your examinesettings.config. Everywhere else you refer to mysearch

    Also the examinesettings.config seems to be missing the InternalIndex and the InternalMemberIndex

    Dave

  • Lars 66 posts 136 karma points
    Apr 23, 2015 @ 10:51
    Lars
    0

    Hi Dave

    The rest of examinesttings.config were just not shown. But thank you very much for your help. You were right and you helped me a good step forward!

    /Lars

Please Sign in or register to post replies

Write your reply to:

Draft