London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
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