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?
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
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):
Is there a better moment to add my custom GatheringNodeData delegate than OnApplicationStarted?
(Similar problem without solution here)
Mi Markus,
I'm experiencing the same issue, did you ever find a resolution to this?
Cheers
Guys,
What happens when you rebuild the index from examine management tab? Does that ignore gathering node event as well?
Regards
Ismail
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
is working on a reply...