1

We are on latest version -Sitecore 8.2 update 3

Below is the query we are using to get all composers for language es-es.

It's giving back 3 results. That's partially right as there are only 3 composer items in Sitecore for es-es. But we have language fallback enabled for es-es. So ideally below query should give us 3 (es-es) items + X (en-gb) items as es-es is falling back to en-gb?

var results = context.GetQueryable<ComposerSearchResultItem>(
                            new CultureExecutionContext(Context.Language.CultureInfo))
                            .Where(x => x.TemplateId == composerId)
                            .Select(x => x.ComposerId);

Am I need to pass any new parameter to Sitecore content search to specify this like give me items with language fallback?

8

For future use:

I found a solution for this, we need to enable language fallback for master and web indexes like below, and rebuild them. By default, this setting is set to false

    <contentSearch>
        <configuration>
            <indexes>
                <index id="sitecore_master_index">
                    <enableItemLanguageFallback>true</enableItemLanguageFallback>
                    <enableFieldLanguageFallback>true</enableFieldLanguageFallback>
                </index>

                <index id="sitecore_web_index">
                    <enableItemLanguageFallback>true</enableItemLanguageFallback>
                    <enableFieldLanguageFallback>true</enableFieldLanguageFallback>
                </index>
            </indexes>
        </configuration>
    </contentSearch>

</sitecore>

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .