Copied to clipboard

Flag this post as spam?

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


  • Russell McGinnis 48 posts 183 karma points
    Feb 04, 2015 @ 00:26
    Russell McGinnis
    0

    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

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Feb 04, 2015 @ 09:08
    Jeroen Breuer
    0

    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

     

     

  • Russell McGinnis 48 posts 183 karma points
    Feb 04, 2015 @ 16:28
    Russell McGinnis
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft