Copied to clipboard

Flag this post as spam?

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


  • Kenny Burns 173 posts 305 karma points
    Mar 23, 2012 @ 16:34
    Kenny Burns
    0

    Custom Examine Index - Help!

    Hi Guys,

    I hope someone can help a brother in need as it approaches the weekend!!

    I have spent most of my day getting to grips with Examine and so far so good - managed to add a custom umbraco index. 

    However, i am trying to add another one for a custom index that was created from a SQL table (uCommerce Products).

    I can search the index using the very helpful LUKE and it returns as expected. The issue I am having is that i am not sure what should go into the Examine.config and Examine.settings files.

    ExamineSettings.config: I need another provider but it is NOT umbraco content so what type should it be?

    I think everything else should follow once i have that sorted. Its more - can I use the UmbracoExamine and another one at the same time?

    Thanks in advance! :)

    ExamineSettings.config:

     

    <providers>
          <add name="InternalIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"
               supportUnpublished="true"
               supportProtected="true"
               interval="10"
               analyzer="Lucene.Net.Analysis.WhitespaceAnalyzer, Lucene.Net"/>
          <add name="InternalMemberIndexer" type="UmbracoExamine.UmbracoMemberIndexer, UmbracoExamine"
               supportUnpublished="true"
               supportProtected="true"
               interval="10"
               analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"/>
           <add name="StockpakIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"
                       runAsync="true"
                       supportUnpublished="true"
                       supportProtected="true"
                       interval="10"
                       analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"/>
       </providers>

     

  • Kenny Burns 173 posts 305 karma points
    Mar 26, 2012 @ 10:29
    Kenny Burns
    0

    Monday morning bump... Sorry to pester...

    Anyone have any ideas?

  • Lee 1130 posts 3088 karma points
    Aug 15, 2012 @ 15:32
    Lee
    0

    Did you ever get this sorted?

  • Ismail Mayat 4511 posts 10091 karma points MVP 2x admin c-trib
    Aug 15, 2012 @ 17:51
    Ismail Mayat
    0

    Guys,

    I did custom db indexer a while back and i have the following in my examine config files:

    ExamineIndex:

      <IndexSet SetName="directoryIndexSet"

             IndexPath="~/App_Data/ExamineIndexes/directory/">

        <IndexUserFields>

          <add Name="name" EnableSorting="true"/>

          <add Name="nodeName" EnableSorting="true"/>

          <add Name="nodeTypeAlias"/>

          <add Name="directoryType" />

          <add Name="countryName" />

          <add Name="countryId"/>

          <add Name="address1"/>

          <add Name="address2"/>

          <add Name="address3"/>

          <add Name="postCode"/>

          <add Name="emailAddress"/>

          <add Name="webSiteUrl"/>

          <add Name="clientNameForUrl"/>

     <add Name="region"/>

        </IndexUserFields>

      </IndexSet>

    You will need to include the files you want these are the fields in my case i have selected from the db.

    ExamineSettings:

    under index providors i have

     <add name="directoryIndexer"

                type="Examine.LuceneEngine.Providers.SimpleDataIndexer, Examine"

                indexSet="directoryIndexSet"

                dataService="ExamineDbIndexer.ExamineATGDbDataService, ExamineDbIndexer"

               analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"

                indexTypes="directory"

                runAsync="true"/> 

    under searchers

    <add name="directorySearcher"

             type="Examine.LuceneEngine.Providers.LuceneSearcher, Examine"

             indexSet="directoryIndexSet" analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net" />

     

    Regards

     

    Ismail

     

     

  • Lee 1130 posts 3088 karma points
    Aug 15, 2012 @ 19:01
    Lee
    0

    I don't see how it connects to the db? How it knows what table or database etc...? How does it know when knew data is added into the field?

  • Ismail Mayat 4511 posts 10091 karma points MVP 2x admin c-trib
    Aug 15, 2012 @ 19:11
    Ismail Mayat
    0

    Hint look at dataservice attribute i have written my own that has all the db tables etc there is sample one in examine code you implement interface and wireup in config and boom custom indexer

Please Sign in or register to post replies

Write your reply to:

Draft