My Umbraco 7.1.4 setup is such that my main content is stored in child nodes of nodes containing the main properties ie.
Node1
-- Content 1
-- Content 2
Node2
-- Content 3
I would like to limit my Examine Indexer to only the Document Types for Node1 and Node2 etc, but then when indexing, pull in the content from the child nodes (into the index).
I have been trying to use the GatherNodeData event, but cannot get it to fire!!
Jeroen, thanks for the reply, I did indeed try this, however I am not sure if I was falling foul of a couple of other items that I may have had mis-configured.
Prior to noticing some mis-configurations, I decided to create a class derived from UmbracoContentIndexer and override the OnGatherNodeData function. This, in conjunction with updating the ExamineIndexProviders tag in the ExamineSettings.config file (to use my new class) has allowed me to debug into the OnGatherDataNode funtion when I publish an item of content. This is now working almost as I was hoping, however I need to manually publish each piece of content to get this function to fire.
I will revisit the event driven solution with a clean configuration to see if it now works.
Including child nodes in parent for searching
My Umbraco 7.1.4 setup is such that my main content is stored in child nodes of nodes containing the main properties ie.
Node1
-- Content 1
-- Content 2
Node2
-- Content 3
I would like to limit my Examine Indexer to only the Document Types for Node1 and Node2 etc, but then when indexing, pull in the content from the child nodes (into the index). I have been trying to use the GatherNodeData event, but cannot get it to fire!!
Any ideas, or alternative solutions.
Thanks Russell
Hello,
Where do you register the GatherNodeData event? It should be in the ApplicationStarted method. See this example: https://github.com/jbreuer/Hybrid-Framework-for-Umbraco-v7-Best-Practises/blob/master/Umbraco.Extensions/Events/UmbracoEvents.cs#L82
Jeroen
Jeroen, thanks for the reply, I did indeed try this, however I am not sure if I was falling foul of a couple of other items that I may have had mis-configured.
Prior to noticing some mis-configurations, I decided to create a class derived from UmbracoContentIndexer and override the OnGatherNodeData function. This, in conjunction with updating the ExamineIndexProviders tag in the ExamineSettings.config file (to use my new class) has allowed me to debug into the OnGatherDataNode funtion when I publish an item of content. This is now working almost as I was hoping, however I need to manually publish each piece of content to get this function to fire.
I will revisit the event driven solution with a clean configuration to see if it now works.
Thanks again.
Russell
is working on a reply...