Copied to clipboard

Flag this post as spam?

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


  • Damian Green 452 posts 1433 karma points
    Oct 08, 2014 @ 20:04
    Damian Green
    0

    Examine GatheringNodeData not getting called on index rebuild

    If i delete and re-create my indexes and restart my app my basic node data is getting indexed.

    However i have an extension on the GatheringNodeData event to add some extra fields to the index. These work perfectly when publishing a node but on the initial rebuild the event isnt been called.

    I am wiring up the event in the application started event:

     public void OnApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
        {
            _context = applicationContext;
    
            if (!applicationContext.IsConfigured || !applicationContext.DatabaseContext.IsDatabaseConfigured)
                return;
    
            try
            {
                ExamineManager.Instance.IndexProviderCollection["JobsIndexer"].GatheringNodeData += JobSearchExtension_GatheringNodeData;
                LogHelper.Info<JobSearchExtension>("Jobs Indexer GatheringNodeData event initialized");
            }
            catch (Exception x)
            {
                LogHelper.Error<JobSearchExtension>("Unable to access Jobs Indexer - check Examine configuration", x);
            }
        }
    

    It cant go in the other events otherwise you get the context locked error. I have also tried eliminating the context.IsConfigured but same issue.

    Any ideas why its not firing?

  • Damian Green 452 posts 1433 karma points
    Oct 08, 2014 @ 20:11
    Damian Green
    0

    Just looked at my logging and can see this:

    2014-10-08 19:02:14,296 [12] INFO umbraco.content - [Thread 1] Loading content from disk cache... 2014-10-08 19:02:15,840 [12] INFO MYProject.UmbracoWeb.Infrastructure.Search.Examine.JobSearchExtension - [Thread 1] Jobs Indexer GatheringNodeData event initialized 2014-10-08 19:02:15,860 [12] INFO Umbraco.Core.PluginManager - [Thread 1] Starting resolution types of Umbraco.Web.Trees.TreeController 2014-10-08 19:02:15,866 [12] INFO Umbraco.Core.PluginManager - [Thread 1] Completed resolution of types of Umbraco.Web.Trees.TreeController, found 4 (took 6ms) 2014-10-08 19:02:15,876 [12] INFO Umbraco.Core.PluginManager - [Thread 1] Starting resolution types of umbraco.interfaces.ITree 2014-10-08 19:02:15,894 [12] INFO Umbraco.Core.PluginManager - [Thread 1] Completed resolution of types of umbraco.interfaces.ITree, found 19 (took 17ms) 2014-10-08 19:02:15,904 [12] INFO Umbraco.Web.Search.ExamineEvents - [Thread 1] Initializing Examine and binding to business logic events 2014-10-08 19:02:15,906 [12] INFO Umbraco.Web.Search.ExamineEvents - [Thread 1] Adding examine event handlers for index providers: 4 2014-10-08 19:02:16,259 [12] INFO UmbracoExamine.DataServices.UmbracoLogService - [Thread 10] Index is being optimized, Provider=InternalIndexer, NodeId=-1 2014-10-08 19:02:19,619 [12] INFO UmbracoExamine.DataServices.UmbracoLogService - [Thread 5] Index is being optimized, Provider=ExternalIndexer, NodeId=-1

    I can see things getting wired up but no events from examine to show when things are getting triggered index wise.

  • minesh shah 4 posts 84 karma points
    Dec 19, 2018 @ 13:42
    minesh shah
    0

    I am facing exactly the same issue as above, did you ever manage to fix.

    I am using umbraco version 7

Please Sign in or register to post replies

Write your reply to:

Draft