Try our conversational search powered by Generative AI!

dada
Apr 3, 2023
  1262
(2 votes)

Improve performance by enabling language routing on search requests

In Find 13, we introduced language routing on indexing to improve indexing performance for indexes setup with multiple languages.

With the release of Find 13.4.9, we further introduced language routing on query time. We recommend moving up to 13.5.7 due to other bug fixes. This feature is also available in .NET flavours: 14.2.4 and 15.0.3

This feature enables passing the query only to the specific language index, rather than having all language indexes process the query even though most of them would only respond with 0 hits as we're usually filtering on language properties in the index.

Since 13.5.1 this feature is disabled by default.

To enable this feature, there are a few steps to follow:

  1. Ensure that you explicitly or implicitly set the language for your query.
    You typically achieve this by using one of the following approaches:
    .Search<type>(language) or .UnifiedSearch(language)
    Alternatively, you can rely on the extensions provided by Episerver.Find.CMS and use
    .UnifiedSearch() or .UnifiedSearchFor()
    which will automatically set the preferred culture if you don't specify one. Be careful not to use the Episerver.Find extensions, as they do not resolve language.

  2. You can verify that everything is working correctly by checking the analyzer set in the JSON for the request against the _search. 
    It should say analyzer:[language]. If you are using .UsingSynonyms() it should say analyzer: synonym_[language_code].

  3. If you are using CMS 11, you can do this in the web.config file by adding the following:
    <appSettings>
        <add key="episerver:EnableLanguageRoutingInSearchRequest" value="true"/>
    If you are using CMS 12, you can do this in the appsettings.json file by adding the following:
    "EPiServer": {
        "Find": {
          "EnableLanguageRoutingInSearchRequest":true
        }
    }


Note that if you have custom InField extension that makes it possible to query fields for multiple language fields, language routing query time cannot be used.

Our tests have shown a decrease in response times of around 25% for queries with language routing enabled. 
However, this improvement may vary depending on your implementation, the number of languages enabled on the index, and the data indexed.

Find versions that support language routing on search requests
https://nuget.optimizely.com/package/?id=EPiServer.Find&v=15.0.3
https://nuget.optimizely.com/package/?id=EPiServer.Find&v=14.2.4
https://nuget.optimizely.com/package/?id=EPiServer.Find&v=13.5.7

Apr 03, 2023

Comments

Eric Petersson
Eric Petersson Apr 4, 2023 06:16 AM

Cool! When updating to Find 13.15.17.0 in .NET Framework I get that the packages are based on EPiServer.Cms 11.20.17, which is not availble from the nuget feed. 

Is there a planned release date when it will be available?

dada
dada Apr 4, 2023 07:25 AM

Hi Eric,

Thanks for the feedback. I assume you mean 13.5.7. I will check with the dev team and get back to you.

Eric Petersson
Eric Petersson Apr 4, 2023 07:32 AM

Hi again, the EPiServer.Cms 11.20.17 version

Please login to comment.
Latest blogs
Optimizely and the never-ending story of the missing globe!

I've worked with Optimizely CMS for 14 years, and there are two things I'm obsessed with: Link validation and the globe that keeps disappearing on...

Tomas Hensrud Gulla | Apr 18, 2024 | Syndicated blog

Visitor Groups Usage Report For Optimizely CMS 12

This add-on offers detailed information on how visitor groups are used and how effective they are within Optimizely CMS. Editors can monitor and...

Adnan Zameer | Apr 18, 2024 | Syndicated blog

Azure AI Language – Abstractive Summarisation in Optimizely CMS

In this article, I show how the abstraction summarisation feature provided by the Azure AI Language platform, can be used within Optimizely CMS to...

Anil Patel | Apr 18, 2024 | Syndicated blog

Fix your Search & Navigation (Find) indexing job, please

Once upon a time, a colleague asked me to look into a customer database with weird spikes in database log usage. (You might start to wonder why I a...

Quan Mai | Apr 17, 2024 | Syndicated blog