Copied to clipboard

Flag this post as spam?

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


  • Markus 33 posts 58 karma points
    Sep 30, 2013 @ 10:47
    Markus
    0

    When to wire up Examine GatheringNodeData event

    Hi,

    In Umbraco v6, I added my custom GatheringNodeData delegate in the OnApplicationStarted event of a IApplicationEventHandler.

    This works fine when I make changes to a node and publish it.

    However, when I force the rebuild of the entire index by deleting it from disk and restarting Umbraco, Examine is rebuilding the index with the settings in ExamineIndex.config, but without calling my custom GatheringNodeData delegate. It seems as if the delegate is added only after the (initial) index is built.

    In UmbracoTraceLog.txt, I can see the following entries (the last entry is my log entry):

    INFO Umbraco.Web.Search.ExamineEvents - [Thread 1] Initializing Examine and binding to business logic events
    ...
    INFO Umbraco.Web.Search.ExamineEvents - [Thread 1] Adding examine event handlers for index providers: 4
    ...
    INFO EmakinaUmbraco.App_Start.AppStart - [Thread 1] ApplicationStarted for AppStart - Adding GatheringNodeData delegate

    Is there a better moment to add my custom GatheringNodeData delegate than OnApplicationStarted?

     

    (Similar problem without solution here)

  • Euan Rae 105 posts 135 karma points
    Feb 05, 2014 @ 15:27
    Euan Rae
    0

    Mi Markus,

    I'm experiencing the same issue, did you ever find a resolution to this?

     

    Cheers

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 05, 2014 @ 17:28
    Ismail Mayat
    0

    Guys,

    What happens when you rebuild the index from examine management tab? Does that ignore gathering node event as well?

    Regards

    Ismail

  • Euan Rae 105 posts 135 karma points
    Feb 06, 2014 @ 10:09
    Euan Rae
    0

    I managed to fix the issue, bit of a face palm moment:

    I was trying to add a custom field named "Regions" with a list of comma separated strings e.g. "Asia,Pacific", while the document type had a property named "regions" with a comma separated list of ids - even though that property wasn't added to the index via the config.  Once I changed the field being added to "RegionNames", the data was being added in all instances: deleting the index files, rebuiling from examine manager, etc

     

    Cheers,

    Euan

Please Sign in or register to post replies

Write your reply to:

Draft