Movatterモバイル変換


[0]ホーム

URL:


Dev guideRecipesAPI ReferenceChangelog
Dev guideRecipesUser GuidesNuGetDev CommunityOptimizely AcademySubmit a ticketLog InCross-platform products
Dev guide
All
Pages
Start typing to search…

Locale (language routing)

Describes how to use language routing.

Language routing is helpful for your search requests because it gets results faster and more accurately. It filters the content by routing to the specified language content. Language routing also uses linguistic processing of content when using thecontains operator on a field. See Optimizely Graph'slocale parameter.

In the Optimizely Graph .NET Client, theLocale andLocales methods are used for routing to the specified language or languages content.

Localemethod

The parameters for the method can be anEPiServer.ContentGraph.Api.LocaleMode enum with two options:

  • ALL – For all indices.
  • NEUTRAL – For standard index.
var query = queryBuilder.ForType<MyDocumentType>()  .Locale(LocaleMode.NEUTRAL)  .Fields(x=>x.Property).ToQuery().BuildQueries();

Locales method

Use this method if you want to route to some languages. The parameters are an array ofSystem.Globalization.CultureInfo.

var query = queryBuilder.ForType<MyDocumentType>()  .Locales(new CultureInfo(“en”), new CultureInfo(“sv”))  .Fields(x=>x.Property).ToQuery().BuildQueries();

Updated 23 days ago



[8]ページ先頭

©2009-2025 Movatter.jp