Copied to clipboard

Flag this post as spam?

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


  • marcelh 171 posts 471 karma points
    Dec 03, 2015 @ 20:32
    marcelh
    0

    Examine media index incomplete after upgrade to 7.3.3

    We're having a bunch of media items indexed with a specific Examine index. All worked ok until I noticed that after upgrading to Umbraco 7.3.3 a lot of items were missing in the search results. Or, better said, the Examine index. Of the 236 media items in total, only 8 are indexed (why?). After saving a media item, the item is added to the index.

    I quickly created a script that saves all media again, this solves the issue for now, but that's not preferred.

    Does anyone know where this comes from, recognizes the issue or knows a way (other than re-saving) to build up the index again?

    What I have done so far:

    • Deleted App_Data\umbaco.config
    • Deleted App_Data\TEMP\ExamineIndexes
    • Re-indexed from within the Examine Management dashboard in te Developer section (and that's where I noticed the missing records)
    • Re-saved all media items using the script below. This fixed the issue.

      public ActionResult RebuildMedia() { int count = 0;

          var parents = Services.MediaService.GetRootMedia();
          foreach (var parent in parents.Where(x => x.Trashed == false))
          {
              Services.MediaService.Save(parent);
              count++;
      
      
      
          var descendants = Services.MediaService.GetDescendants(parent);
          foreach (var descendant in descendants.Where(x => x.Trashed == false))
          {
              Services.MediaService.Save(descendant);
              count++;
          }
      }
      
      
      return Content(string.Format("<h1>Finished saving {0} media items.</h1>", count));
      
      }
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies