Only current language version is re-indexed

Member since: 2007

Not sure if this is a bug or expected behaviour.

I'm using Find with EPiServer 6 and when a page is changed, only that specific language version is re-indexed, not all language versions of that page.

If a property doesn't have unique values per language (not culture specific/globalised), and we change that value on the master language and re-publish which triggers a re-index, we end up with different values for this property on different language versions.


A full re-index solves the problem though.

#69690 Apr 02, 2013 21:09
  • Member since: 2007

    ... and is there a workaround for this?

    After some further testing, this should be a bug.

    Un-published pages can show up in search results, because publishing dates are only set on master language.

     

    #69691 Apr 02, 2013 21:10
  • Thank you for reporting this Johan. I have entered it as a bug and will look at creating a fix for it.

     

    -Marcus

    #69699 Apr 03, 2013 10:21
  • Member since: 2007

    Thanks Marcus.


    Is there a workaround? I guess we can listen to datafactory events and index all language versions too, but maybe there is a simpler way?

    #69700 Apr 03, 2013 10:25
  • I'm not sure it's much easier but you could probably use related pages/dependencies.

    #69702 Apr 03, 2013 11:32
  • For CMS 7 all language versions will be reindexed when one is changed. As for CMS 6 you can use the following snippet (based on related pages):

    PageIndexer.Instance.Conventions
      .ForInstancesOf<PageData>()
      .RelatedPages(x =>
      {
        return DataFactory.Instance.GetLanguageBranches(page.PageLink).Select(x => x.TryAsTyped());
      });
        
    #69960 Apr 10, 2013 10:36
  • Member since: 2007

    Thanks Henrik,


    I've already solved it with the RelatedPages approach :) Just forgot to post it here and mark the thread as solved.

    #69976 Apr 10, 2013 12:09