Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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!
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?
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?
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.
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.
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.
Cheers, have done exactly that. Thanks again!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted