Copied to clipboard

Flag this post as spam?

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


  • Bharath 40 posts 62 karma points
    Jun 21, 2010 @ 17:57
    Bharath
    0

    Lucene Index refresh not working or updated on content tree node publish

    Can you please let me know how to configure Lucene Index for Content searching in Umbraco?

    I am seeing Lucene index files folder in umbraco 4.0.3 installation "data/_systemUmbracoIndexDontDelete".

    however when i look through the index file i am not able to see any entries inside the index.

    Lucene Index needs to be updated whenever content tree node is published.

    I will be doing a custom search page implementation based on the lucene index on conent of umbraco. please suggest.

     

  • Bharath 40 posts 62 karma points
    Jun 22, 2010 @ 16:57
    Bharath
    0

    Anyone please suggest what change/config i need to do inorder for the lucene index to work?

    I am using umbraco 4.0.3 installation and seeing a folder named "data/_systemUmbracoIndexDontDelete".

    i tried UmbracoExamine also, but still not able to get the Lucene Index creation/updattion/refreshing working. 

    Please help...!!!

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jun 22, 2010 @ 21:40
    Aaron Powell
    0

    you will receive better help if you provide reasons for problems, not just saying that something is "not working".

    The Lucene.Net implementation in 4.0 was prone to getting corrupt quite easily, and it also had many leaks, resulting in it getting very large very quickly.

    Examine is the recommended solution, and there is documentation on codeplex on how to set it up.

  • Bharath 40 posts 62 karma points
    Jun 22, 2010 @ 23:02
    Bharath
    0

    Thanks Slace. I went through code plex Examine documentation and made required changes to web.config. however i am not seeing lucene index getting created. i made required config changes as follows. could you please check and let me know what i am doing wrong.

    In Web.config

    ====================

    <configSections>

    <section name="Examine" type="Examine.Config.ExamineSettings, Examine"/>

    <section name="ExamineLuceneIndexSets" type="UmbracoExamine.Config.ExamineLuceneIndexes, UmbracoExamine"/>

    </configSections>

    <Examine configSource="config\ExamineSettings.config"/>

    <ExamineLuceneIndexSets configSource="config\ExamineIndex.config"/>

    In ExamineIndex.config

    ========================

    <ExamineLuceneIndexSets>

      <IndexSet SetName="Default" IndexPath="~/App_Data/ExamineIndexes/Internal/">

        <IndexAttributeFields>

          <add Name="id" />

          <add Name="nodeName" />

          <add Name="updateDate" />

          <add Name="writerName" />

          <add Name="path" />

          <add Name="nodeTypeAlias" />

          <add Name="parentID" />

        </IndexAttributeFields>

        <IndexUserFields />

        <IncludeNodeTypes>

          <add Name="ProductsDocumentTypes" />

        </IncludeNodeTypes>

        <ExcludeNodeTypes />

      </IndexSet>

    ExamineSettings.config

    ============================

    <Examine>

      <ExamineIndexProviders enableDefaultEventHandler="true">

        <providers>

          <add name="InternalIndex" type="UmbracoExamine.LuceneExamineIndexer, UmbracoExamine"

               indexSet="Default"

               enabled="true"

               runAsync="true"

               supportUnpublished="false"

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

        </providers>

      </ExamineIndexProviders>

    </Examine>

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jun 23, 2010 @ 12:07
    Aaron Powell
    0

    have you looked in the umbracoLog table for errors?

  • Bharath 40 posts 62 karma points
    Jun 23, 2010 @ 21:23
    Bharath
    0

    Hello Slace.... Following is the Error message i am getting when i do publish a content node.

    Error indexing node: System.MissingMethodException: Method not found: 'Void Lucene.Net.Documents.Document.Add(Lucene.Net.Documents.Field)'.     at umbraco.cms.businesslogic.index.Indexer.IndexNode(Guid ObjectType, Int32 Id, String Text, String UserName, DateTime CreateDate, Hashtable Fields, Boolean Optimize)     at umbraco.cms.businesslogic.web.Document.Index(Boolean Optimze)

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jun 24, 2010 @ 16:10
    Aaron Powell
    0

    What is the version of the Lucene.Net assembly which you are running? Examine is running 2.9.2

  • Bharath 40 posts 62 karma points
    Jun 24, 2010 @ 19:20
    Bharath
    0

    Lucene.Net.dll version ---> 2.9.2.1

    FYI - i downloaded from codeplex UmbracoExamine and copied to BIN folder of Umbraco4.0.3 instance the UmbracoExamine.dll,  Lucene.Net.dll, Examine.dll. Overwritten the olden version of lucene that was used by umbraco4.0.3 instance (which is Lucene.Net.dll 2.3.1.2)

    Please let me know whether i am doing something wrong?

  • Bharath 40 posts 62 karma points
    Jun 24, 2010 @ 22:38
    Bharath
    0

    THANKS A LOT SLACE... you helped me by pointing towards umbracoLog table for errors.

    umbracoLog table helped to DEBUG the ISSUE till RESOLUTION.

    Now i am able to get the Lucene Index updated whenever i am publishing the contents in content tree. Thanks Again.

  • arviman 71 posts 92 karma points
    Jul 01, 2010 @ 00:40
    arviman
    0

    Bharath,

    Would you be so kind as to describe what exactly caused the problem? I'm having a similar problem, but I believe it might be due to the wrong version of the Lucene.net assembly

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jul 01, 2010 @ 00:45
    Aaron Powell
    0

    If you are using Examine you need to use the Lucene.Net release that ships with it, which is Lucene.Net 2.9.2

    It will not work with any older version

  • arviman 71 posts 92 karma points
    Jul 01, 2010 @ 01:09
    arviman
    0

    I was getting the same error while publishing nodes. I'm using a custom branch of 4.0.1, and turns out that with the latest lucene.net dll 2.9.2.1 was causing this error along with the umbsearch2 package. I reverted to 2.0.0.4 and it started working again.

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jul 01, 2010 @ 01:11
    Aaron Powell
    0

    I don't know what umbsearch2 uses, but you should stick with what ever comes in their release package

  • arviman 71 posts 92 karma points
    Jul 01, 2010 @ 04:01
    arviman
    0


    We had to switch my search package from umbSearch2 to Examine as umbSearch did not have the flexibility that we require on our project, and the very helpful Paul Sterling in the Umbraco support team also recommended it. We're still using umbraco 4.0.1, but I'm having a pretty hard time getting the indices to build.I've read elsewhere that 4.0.3 is not fully supported on the older version of examine. So I went ahead and got the latest version of Examine (Release ver. 54684).

    I'm not sure if I should be posting this here instead of starting a new topic ; there's also a similar thread over at  http://our.umbraco.org/forum/developers/extending-umbraco/7732-Umbraco-Examine-Search-Setup?p=1 but Shannon's fix for a bug that occurs in 4.0.3 doesn't work for me.

    Here's what I've so far : I built the following dll's from source: Examine.dll, UmbracoExamine.Contrib.dll and UmbracoExamine.dll and copied them over to bin of my site

    I added the following configuration in web.config, and published a few nodes. The directory "MediahouseIndexSetTest" does get created in my App_Data when I published a node, but I'm not getting anything in the "index" and "queue" folders. I also tried changing 'runAsync' in my Index Provider from false to true, but nothing came of that.

    <configSections>
        <!-- Examine-->
        <section name="Examine" type="Examine.Config.ExamineSettings, Examine"/>
        <section name="ExamineLuceneIndexSets" type="UmbracoExamine.Config.ExamineLuceneIndexes, UmbracoExamine"/>
    </configSections>
    <Examine>

        <ExamineIndexProviders>

          <providers>

            <!-- Shows all of the configuration options available -->
            <add name="MediahouseIndexer"
                 type="UmbracoExamine.LuceneExamineIndexer, UmbracoExamine"
                 indexSet="MediahouseIndexSet"
                 supportUnpublished="false"
                 supportProtected="false"
                 runAsync="true"
                 interval="5"
                 analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"
                 enableDefaultEventHandler="false"/>

          </providers>

        </ExamineIndexProviders>


        <ExamineSearchProviders defaultProvider="MediahouseSearcher">
          <providers>

            <!-- Used to show how to create a searcher by naming convensions -->

            <!-- This search provider is used for our test searches -->
            <add name="MediahouseSearcher"
                 type="UmbracoExamine.LuceneExamineSearcher, UmbracoExamine"
                 indexSet="MediahouseIndexSet"
                 analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"              />


          </providers>
        </ExamineSearchProviders>
      </Examine>
     
      
      <ExamineLuceneIndexSets>
        <!-- Shows most options except for exclude -->
        <IndexSet SetName="MediahouseIndexSet"
                  IndexPath="~\App_Data\MediahouseIndexSetTest"
                  IndexParentId="-1">
          <IndexAttributeFields>
            <add Name="id" />
            <add Name="nodeName" EnableSorting="true" />
            <add Name="updateDate" />
            <add Name="writerName" />
            <add Name="path" />
            <add Name="nodeTypeAlias" />
            <add Name="parentID" />
          </IndexAttributeFields>
          <IndexUserFields>
            <add Name="article_headLine" EnableSorting="true" />
            <add Name="article_body1" EnableSorting="true" />
            <add Name="article_body2" />
            <add Name="article_displayedPublishDate" />
          </IndexUserFields>
          <IncludeNodeTypes>
            <add Name="Article" />
          </IncludeNodeTypes>
          <ExcludeNodeTypes />
        </IndexSet>


      </ExamineLuceneIndexSets>

    Is there any obvious error in here? I also tried giving full permission to my Index set folder, to the "creator, network service and admin users".

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jul 01, 2010 @ 06:02
    Aaron Powell
    0

    Check your umbracoLog table and see if there in an event on application state indicating the Examine event handlers are setup.

    If they aren't then Examine wont run and you're likely to have errors in the log too.

  • arviman 71 posts 92 karma points
    Jul 02, 2010 @ 04:05
    arviman
    0

    The only entries in the logComment column are "[UmbracoExamine] Adding examine event handlers for index providers: 0".

    Does this mean that the event handlers are not being set up? Wonder why that's happening. Aren't the examine dll's supposed to take care of that automatically? I'm not getting other errors in my table though.

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jul 02, 2010 @ 04:09
    Aaron Powell
    0

    It means that there are no configured providers. Is the config you  listed above in your web.config?

  • arviman 71 posts 92 karma points
    Jul 02, 2010 @ 18:50
    arviman
    0

    Yes it's in my web.config file. These tags are under the <configuration> tag. I tried including them in seperate source files(like the umbraco 4.5 web.config), but still nothing. Perhaps I should provide a defaultProvide for the index provider?

  • arviman 71 posts 92 karma points
    Jul 02, 2010 @ 20:09
    arviman
    0

    Thanks for the lead slace! I finally got the indices to build finally after tweaking the web.config file.

    Here's the configuration for the providers. I think removing the 'analyzer' attribute did the trick.

    <Examine>

    <ExamineIndexProviders>

    <providers>

    <!-- Shows all of the configuration options available -->
    <add name="MediahouseIndexer"
    type="UmbracoExamine.LuceneExamineIndexer, UmbracoExamine"
    indexSet="MediahouseIndexSet"
    runAsync="true"

    />

    </providers>

    </ExamineIndexProviders>


    <ExamineSearchProviders defaultProvider="MediahouseSearcher">
    <providers>

    <!-- Used to show how to create a searcher by naming convensions -->

    <!-- This search provider is used for our test searches -->
    <add name="MediahouseSearcher"
    type="UmbracoExamine.LuceneExamineSearcher, UmbracoExamine"
    indexSet="MediahouseIndexSet"
    />


    </providers>
    </ExamineSearchProviders>
    </Examine>

     

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jul 05, 2010 @ 05:18
    Aaron Powell
    0

    Actually you disabled the events (enableDefaultEvents=false), that was your problem, you turned off the Umbraco events, so the only way to get data into the index was to manually push it there.

  • Martin Griffiths 826 posts 1269 karma points c-trib
    Sep 06, 2010 @ 18:04
    Martin Griffiths
    0

    Somebody pleeeease help!

    We have a build of Umbraco 4.0.4.2 that's had Examine applied to it. We've got 8 custom indexes setup in the examine settings file and they test and build successfully in classic pipeline mode on IIS6 and IIS7.

    If we switch to integrated mode, the folders get created but the queues dont get worked on, it just stops! There's nothing obvious in the umbraco logs to indicate a problem either.

    Strangely locally on my Windows 7 PC (IIS7.5) the indexer works fine in integrated mode which is all the more frustrating!

    Anyone out there with ANY ideas to indicate where it's going wrong would be much appreciated.

    We're using the latest Examine dlls from RC3.

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Sep 07, 2010 @ 00:42
    Aaron Powell
    0

    Posting the same question across multiple threads is generally frowned upon, I was replying to you in this thread: http://our.umbraco.org/forum/developers/extending-umbraco/7732-Umbraco-Examine-Search-Setup?p=2

    Did you try what I suggested, disabling async and then checking the log table?

Please Sign in or register to post replies

Write your reply to:

Draft