Last updated: Apr 06 2018

Area: Episerver Find Applies to versions: 13 and up

Language routing

The Language Routing feature limits search queries to documents in a specified language. The feature makes querying more precise by reducing the number of false positive matches, since documents are only analyzed for one language. Since Language Routing optimizes indexing performance and increases query precision, it is recommended to use it when indexing documents. Language Routing requires no change to search queries.

Previously, all documents were analyzed for all supported languages. This practice sometimes caused noise when one language's stemming rules collided with another's.

Adding language routing on any type of object

You can add language routing to any type of object via the LanguageRoutingAttribute or the conventions API.


You can add language routing via the LanguageRoutingAttribute on the property. Set it to the desired language when initializing the object.

public class WithLanguageRoutingAttribute
     public string Id { get; set; } 
     public LanguageRouting LanguageRouting { get; set; } 
var indexedObject = new WithLanguageRoutingAttribute()

     Id = "123", 
     LanguageRouting = new LanguageRouting(Language.Swedish) 


Another option is to use the conventions API in Find.

client.Conventions.ForInstancesOf<WithLanguageRouting>().LanguageRoutingIs(x => x.LanguageRouting);

Note: After upgrading to Find 13, reindex the whole site as soon as possible.

See also: Language routing support for content implementing ILocale.

Do you have feedback on this documentation? Send an email to documentation@episerver.com. For development-related questions and discussions, refer to our Forums on https://world.episerver.com/forum/