Copied to clipboard

Flag this post as spam?

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


  • Alex Skrypnyk 6133 posts 23952 karma points MVP 7x admin c-trib
    Dec 18, 2014 @ 14:54
    Alex Skrypnyk
    0

    We can't delete node via code

    We have strange problem with Umbraco 7.2, when we trying to delete node from code :

    {"Message":"An error has occurred.","ExceptionMessage":"Could not find file '\AppData\TEMP\ExamineIndexes\Internal\Index\1ay.cfs'.","ExceptionType":"System.IO.FileNotFoundException","StackTrace":" at Lucene.Net.Index.SegmentInfos.FindSegmentsFile.Run(IndexCommit commit)\r\n at Examine.LuceneEngine.Providers.LuceneSearcher.ValidateSearcher(Boolean forceReopen)"}

    Deleting we are making with this code:

    ApplicationContext.Services.ContentService.Delete(node);
    

    Thanks

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Dec 18, 2014 @ 15:27
    Jan Skovgaard
    100

    Hi Alex

    Have you tried clearing the indexes in the temp folder and then rebuilding them and see if you can succeed?

    Otherwise could it be an option to upgrade to 7.2.1 and see if that fixes it? Even though it's not on the fixed issues list one never knows if it has been fixed because other related issues might have been fixed.

    Looking forward to hearing from you.

    /Jan

  • Alex Skrypnyk 6133 posts 23952 karma points MVP 7x admin c-trib
    Dec 18, 2014 @ 15:29
    Alex Skrypnyk
    1

    Hi Jan,

    Thanks for you response. We fixed that issue with adding to the ApplicationStarted event rebuild all indexes.

    ExamineManager.Instance.IndexProviderCollection.ToList().ForEach(index => index.RebuildIndex());
    

    It's little bit not perfect for performance of application start, but now we have fresh indexes after each deployment.

    Thanks, Alexander

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Dec 18, 2014 @ 15:34
    Jan Skovgaard
    1

    Hi Alex

    Happy that you managed to get it solved and thanks for sharing your solution - It might become useful for others as well :)

    Cheers, Jan

Please Sign in or register to post replies

Write your reply to:

Draft