Copied to clipboard

Flag this post as spam?

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


  • Robin Herd 6 posts 77 karma points c-trib
    Mar 03, 2015 @ 14:37
    Robin Herd
    0

    Examine RebuildIndex() failing

    Hi all,

    I have a site running 7.2.1 and I'm having difficulty with rebuilding the Examine index. In the Developer section, clicking Rebuild Index causes my site search to show no results. On inspection of the index files, they come to a total of 2 KB. If I stop my site, delete these files and restart, then the index is successfully rebuilt (and the index files again come to ~800 KB). I have been through this process a few times and experienced the same result every time.

    Additionally, if I try to programmatically call ExamineManager.Instance.RebuildIndex(), I experience the same result (rebuild fails and the index has essentially disappeared). 

    I’ve checked the Umbraco logs and can’t see anything relevant. If anyone has any ideas it’d be greatly appreciated!

    Cheers,

     

    Robin

  • Ismail Mayat 4511 posts 10062 karma points MVP 2x admin c-trib
    Mar 03, 2015 @ 14:48
    Ismail Mayat
    100

    Robin,

    Are you doing anything with gatheringnode data? If you are then becuase of the version you are on I can explain why restarting app builds index but manually rebuilding does not.  See https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/60201-GatheringNode-event-on-complete-rebuild so if you are doing gatheringnode if may be you have an issue in your code if so stick a debugger on it.  If you are not doing gathering node then something else is causing the issue if there is nothing in umbraco log files can you check the server event logs see if anything there?

    Regards

    Ismail

  • Robin Herd 6 posts 77 karma points c-trib
    Mar 03, 2015 @ 14:57
    Robin Herd
    0

    Hey Ismail, 

    Thanks for the quick reply. I am indeed using GatheringNodeData; I just commeted that out and the index rebuilds fine. However my GatheringNodeData event handlers are all using proper exception handling - what sort of thing could be causing the rebuild to fail completely?

    Cheers,

    Robin

  • Ismail Mayat 4511 posts 10062 karma points MVP 2x admin c-trib
    Mar 03, 2015 @ 15:39
    Ismail Mayat
    0

    Robin,

    Stick the debugger on it and see what happens, there must be an exception somewhere, also i would upgrade to 7.2.2 else on rebuild any data injected by gatheringnode will not be there and if you app is critical on that data like ours was I would upgrade or put another rebuild index event after application started event.

    Regards

    Ismail

  • Robin Herd 6 posts 77 karma points c-trib
    Mar 03, 2015 @ 15:52
    Robin Herd
    0

    Hi Ismail,

    You were right - I've now fixed this code and everything is running smoothly. Still not entirely sure why this (1) didn't cause the code to break and (2) stops the index from rebuilding, but at least I've got it working now.

    Thanks,

    Robin

  • Ismail Mayat 4511 posts 10062 karma points MVP 2x admin c-trib
    Mar 03, 2015 @ 16:47
    Ismail Mayat
    0

    Robin,

    Cool, dont forget to mark as solved also I would still look at upgrading or adding the rebuild index call in application started or else you could get issues like we had.

    Regards

    Ismail

  • Robin Herd 6 posts 77 karma points c-trib
    Mar 03, 2015 @ 16:51
    Robin Herd
    0

    Cheers, have done exactly that. Thanks again!

Please Sign in or register to post replies

Write your reply to:

Draft