Copied to clipboard

Flag this post as spam?

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


  • davelane 29 posts 73 karma points
    Jul 15, 2009 @ 14:21
    davelane
    0

    Lucene Search prevents Node Deletion - Any workaround suggestions?

    Hey all,

    A colleague of mine put together a search package for use in Umbraco v3.x that was capable of searching for / indexing pdfs, docs, etc. using Lucene.  I installed this package and got it working in Umbraco v4.0.0 and tweaked it to my client's satisfaction.  Now, however, I've discovered that you can no longer fully delete nodes in the UI!

    What happens is you "delete" the node (say a page in the content hierarchy, or a media file) and the icon disappears, but the node name remains, and clicking on it results in a server error "Object reference not set to an instance of an object" (displayed below).  Trying to delete it again is no help.

    A previous forum article pointed me to discover that it's the version of Lucene that causes the problem (in this case 1.9.0.0).  So I swapped out the Lucene.Net.dll file with v. 2.0.0.4.  Now I can delete nodes! BUT, I can't use the search anymore!  Trying to search the website gives a different server error "Method not found: 'Lucene.Net.Search.Query Lucene.Net.QueryParsers.QueryParser.Parse(System.String, System.String, Lucene.Net.Analysis.Analyzer)'." (see bottom of my post).

    Does anyone know of a workaround?  I'm trying to avoid having to remove this package, install umbSearch2 (which looks great but is SO new), and then trying to set it up for a client when the project is basically finished and budget expired.  But it's a pretty critical bug.

    Thanks so much for any help!!
    Dave

    p.s. running Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082

    --
    Here's the error when you click on a "deleted" node:

    Object reference not set to an instance of an object.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

    Source Error: 

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace: 

    [NullReferenceException: Object reference not set to an instance of an object.]
      umbraco.controls.ContentControl..ctor(Content c, publishModes CanPublish, String Id) +525
       umbraco.cms.presentation.editMedia.OnInit(EventArgs e) +305
       System.Web.UI.Control.InitRecursive(Control namingContainer) +333
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378

    --

    Here's the error when you try to search using lucene 2.0.0.4's dll:

    Method not found: 'Lucene.Net.Search.Query Lucene.Net.QueryParsers.QueryParser.Parse(System.String, System.String, Lucene.Net.Analysis.Analyzer)'.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.MissingMethodException: Method not found: 'Lucene.Net.Search.Query Lucene.Net.QueryParsers.QueryParser.Parse(System.String, System.String, Lucene.Net.Analysis.Analyzer)'.

    Source Error: 

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace: 

    [MissingMethodException: Method not found: 'Lucene.Net.Search.Query Lucene.Net.QueryParsers.QueryParser.Parse(System.String, System.String, Lucene.Net.Analysis.Analyzer)'.]
       umbSearch.userControls.umbSearchControl.doSearch(Object sender, EventArgs e) +0
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

     

  • davelane 29 posts 73 karma points
    Jul 15, 2009 @ 19:59
    davelane
    0

    Wow that was a long post...

    Just an update: I've narrowed it down to see that it's only the deletion of Media files that is affected.  So i'm leaving the old dll (1.9.0.0) and telling them not to delete the PDFs.  I've added an "excludeFileFromSearch" property to the file media type, which they can set to "yes"

    Cheers!
    Dave

  • mph 44 posts 78 karma points
    Jul 16, 2009 @ 11:03
    mph
    0

    Hi Dave!

    I had the same problem as you... I solved it by replacing the dll with 2.0.0.4 and implementing XLSTSearch instead.

    After I did that the umbSearch package has been upgraded to work with the new dll.

    You could give it a try... http://umbsearch2.codeplex.com/

    NB: It's not only media files that are affected, by using the old dll you cannot empty the recycle bin, and the embeded search fuction in the UI does not work. I would absolutely advice against using the old dll.

    Have a great summer!

    Michael

Please Sign in or register to post replies

Write your reply to:

Draft