17

On our Sitecore 8.1 Update-2 site we have configured two languages:

  • English
  • German (which should fallback to English)

So we have configured language fallback and it works as it should. We have also configured the sitecore_master_index to enable language fallback as described here.

If my item only has 1 version in English and I rebuild the whole index, I see this item now twice in the search index (one item in English and one Item in German) with exactly the same content. This is exactly what I expect it to be.

Today I have updated to Sitecore 8.1 Update-3 (due to a bug with public reference number 109119, see Release Notes). But when I now rebuild my index, I only have one item version in the index (in English). The item version which is fallbacked (German) is not added to the index.

Did something change between Update-2 and Update-3? Or do I misunderstand how this should work? How can I be sure that both versions are in the index? The Sitecore API etc. always returns me correct versions and the fallback works.

UPDATE

In the Release Notes I found the following point:

108981: The index may have contained documents for non-existing item versions when item-level language fallback was enabled.

Has this something to do with my issue? Was is wrong as it worked before and they fixed this now?

1
  • hi. in update-2, did you had any issue with lucene index for web database contains single item lang version twice in the index ? Commented Mar 16, 2017 at 11:02

3 Answers 3

11

Sitecore has registered this as a bug and provided a custom SitecoreItemCrawler. The Sitecore issue number is 471497 and the public reference numbers for this issue are 124202, 103362, 127177.

4
  • Thanks for posting this. I got the custom itemcrawler from Sitecore and it is now correctly adding index documents for each language. However this does only work when rebuilding the index. It does not appear to work for index updates caused by normal publishes. Are you experiencing this as well? Commented Oct 27, 2016 at 9:26
  • Yes I have the same issue with the web index. This does not work for me at all. Sitecore is still investigating there. Commented Oct 28, 2016 at 6:43
  • Yes I have them investigating it as well. At the moment I'm forced to do two searches and then merge the results Commented Oct 28, 2016 at 7:42
  • The release notes for 8.2 update 1 lists Solr - Fallback versions are not indexed when Language Fallback is enabled. with TFS number 118246. I am hoping that is the same issue.
    – Ben Golden
    Commented Jan 25, 2017 at 20:56
1

I'm pretty sure it's a misunderstanding with the way that it works on your part. But it's ok. It's clear that you thought this due to the nature of the bug.

In Sitecore 8.1 Update-2, there is a bug that indexed all language versions of item, regardless of whether or not, an actual version exists when fallback is enabled. This should not be the case. This was fixed, as you note in your update, in Reference Number 108981 and released as part of the bug fixes in Sitecore 8.1 Update 3.

There should only be a language version in the index for an item that truly has a language version.

3
  • 1
    And what is the setting enableLanguageFallback in the index configuration for? IMO this should work exactly the same as in the Sitecore API and there is also returned a fallbacked item if there is no version in this language. Is there a way to introduce the "bug" again? ;-) Commented Oct 7, 2016 at 4:34
  • Let me chew on that. =) Commented Oct 7, 2016 at 4:36
  • I'm still not sure if this is really expected behavior ;-) They fixed several things in the new SitecoreItemCrawler. But what really causes my issue is that in the ItemVersions class, while loading the versions, Sitecore has added a LanguageFallbackItemSwitcher to disabled language fallback. Why does Sitecore want to do this? If I load the item versions over ItemManager.GetVersions(item, language) then I retrieve the fallbacked versions. Why should this work differently? Commented Oct 7, 2016 at 9:39
0

It was my understanding that the language fallback was only implemented on the item provider, not at content search level, meaning that if you want to support fallback on your search you have to implement the logic on your query or post-process the results. I really hope I'm wrong and language fallback is already implemented at Content search level.

1
  • 1
    But what would be the setting enableLanguageFallback on the index configuration which is mentioned here? Sitecore support thinks that this is expected behavior, they should be in the index. Let's see how this will go on :) Commented Oct 7, 2016 at 12:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.