Copied to clipboard

Flag this post as spam?

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


  • Jonas Eriksson 930 posts 1825 karma points
    Dec 31, 2009 @ 10:54
    Jonas Eriksson
    0

    Can I uninstall Lucene? Do I need it?

    Hi! Does Umbraco use Lucene under the hood in some way? I use xslt search on my sites and havent done any reading about Lucene yet, and frankly I do not understand what it does other than it's indexing everything. And since the indexing part gives me some errors from time to time, and the number of files it's producing is huge I wonder if I can disable or even uninstall it?

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Dec 31, 2009 @ 11:09
    Chris Houston
    0

    Hi Jonas,

    I think it is used for the search within Umbraco UI on the top left corner, so if you removed Lucene the search will fail.

    Cheers,

    Chris

  • jaygreasley 416 posts 403 karma points
    Dec 31, 2009 @ 11:52
    jaygreasley
    1

    I think Chris is correct, it is used internally by Umbraco for searching.

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Dec 31, 2009 @ 12:38
    Chris Houston
    1

    Hi,

    You might find this related page on the Wiki an interesting read:

    http://umbraco.org/documentation/books/codegarden-2008/advanced-lucene-search

    Cheers,

    Chris

  • Jonas Eriksson 930 posts 1825 karma points
    Jan 01, 2010 @ 12:37
    Jonas Eriksson
    0

    Ah, thanks. I let it be there then... And I wait for 4.1 and "Examine"

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jan 02, 2010 @ 13:10
    Sebastiaan Janssen
    1

    I was also getting loads and loads of errors on this at some point. As it turns out, I had written some event handlers that performed really poorly and did things in a very inefficient way. 

    I refactored the event handlers, most notably, I stopped using "document.XmlGenerate" after updating a document, instead, I now use "library.UpdateDocumentCache(document.Id)", which I should've done in the first place.

    Finally, after the refactoring, I ran: http://the.site/umbraco/reindex.aspx to regenerate the Lucene index (depending on the number of nodes in your site, this might take a while).

    I've been free of Lucene errors ever since!

  • Jonas Eriksson 930 posts 1825 karma points
    Jan 02, 2010 @ 14:47
    Jonas Eriksson
    0

    Ah, thanks Sebastian, doing that myself now, takes some time as you said, 5 minutes 25% done.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jan 05, 2010 @ 14:23
    Sebastiaan Janssen
    0

    I am currently investigating problems I'm having with the Lucene indexer, it might not be completely thread safe. For the time being, I've even disabled indexing for some most of the nodes, with an event handler that cancels the indexing event:

    namespace EventHandlers
    {
    

     public class CancelLuceneIndexer : ApplicationBase
     {

      public CancelLuceneIndexer()
      {
       Document.BeforeAddToIndex += CancelIndexer;
      }
     
      private static void CancelIndexer(Document sender, AddToIndexEventArgs e)
      {
       if(sender.ContentType.Alias == "HotSpot") e.Cancel = true;
      }

     }
    }
  • Pete 152 posts 176 karma points
    Jan 21, 2010 @ 16:35
    Pete
    0

    Are you able to expand more on how you disabled indexing? Is this in the Umbraco source rather than a website solution? I can't see an EventHandlers namespace...

    If I cannot resolve my issue here http://our.umbraco.org/forum/getting-started/installing-umbraco/6594-No-sub-file-with-id-_kpkf6-found I will need to look at doing something like this as my client can't publish at the moment and it is becoming a huge issue.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jan 21, 2010 @ 17:14
    Dirk De Grave
    0

    Quoting @Shazwazza: "an easy way to disable lucene indexing in 4.0.x is just delete the lucene dll... no errors are thrown & no indexes made."

     

    See if that can help (But of course, this means you can't search for documents in the backend...)

     

    Cheers,

    /Dirk

  • Pete 152 posts 176 karma points
    Jan 21, 2010 @ 17:45
    Pete
    0

    I tested this on my staging server and it worked fine. 

     

    So I tried it on live and I get an error ??? 

    Could not load file or assembly 'Lucene.Net, Version=2.0.0.4, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

     

    What on earth is going on?!

  • CH 5 posts 70 karma points
    Sep 13, 2011 @ 12:14
    CH
    0

    if you use Umbraco with Lucene/Examine in a loadbalanced environment, you might have to check this thread

    https://examine.codeplex.com/discussions/270941

     

Please Sign in or register to post replies

Write your reply to:

Draft