SaaS CMS has officially launched! Learn more now.
AI OnAI Off
SaaS CMS has officially launched! Learn more now.
The easiest way would be just to just use the build in filter called FilterOnLanguages
public T GetPageData<T>() where T:PageData
{
return this.searchClient.Search<T>()
.FilterOnLanguages(new List<string>(){"en"})
.GetContentResult().Items.FirstOrDefault();
}
Hi Anders,
Thanks for your quick response.
I found the issue .
The property ExistingLanguage is not indexed in EPiFind. However there was an extension method ExistingLanguage() has been indexed .
If you want to filter on languages then the below code also works :).
public T GetPageData<T>() where T:PageData
{
return this.searchClient.Search<T>().Filter(x => x.ExistingLanguages().MatchCaseInsensitive("en")).GetContentResult().Items.FirstOrDefault();
}
Now we have two solutions for filtering content on lanaguages.
Regards
Phani
Hi Team,
I want to filter page by exiting languages .
The below method always retrnng me null value.
Is the any thing wrong with my query.
I am using the latest verion of Find