Copied to clipboard

Flag this post as spam?

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


  • David Clapperton 7 posts 57 karma points
    Sep 02, 2016 @ 15:15
    David Clapperton
    0

    Updating Search Index in ApplicationEvents - Azure Issue

    I've been trying to add a boost to the nodeName field in my site search. This works great locally however when i publish to azure the site simply times out. I also tried previously adding an event in ApplicationEvents to reindex a cusom IndexSet again it works locally but timed out on publishing to azure, can anyone help me on this please ?

          protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
            {
              (ExamineManager.Instance.IndexProviderCollection["PublicSearchIndexer"] as UmbracoContentIndexer).DocumentWriting += ApplicationEvents_DocumentWriting;
    
              base.ApplicationStarted(umbracoApplication, applicationContext);
            }
    
            private void ApplicationEvents_DocumentWriting(object sender, Examine.LuceneEngine.DocumentWritingEventArgs e)
            {
                var field = e.Document.GetField("nodeName");
                field.SetBoost(1.5f);
            }
    
  • David Clapperton 7 posts 57 karma points
    Sep 05, 2016 @ 09:38
    David Clapperton
    100

    Found a solution myself adding this to appsettings seemed to fix the issue:

    <add key="umbracoContentXMLUseLocalTemp" value="false" />
    
Please Sign in or register to post replies

Write your reply to:

Draft