Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Hi Rich,
Please format the query in below format
result = result.Filter(r => (r.MatchType(typeof (UserDto)) & ((UserDto) r).FirstName.Prefix(filter.SearchLetter)));
result = result.OrFilter(r => (r.MatchTypeHierarchy(typeof(BaseLocationPage)) & ((BaseLocationPage)r).PageName.Prefix(filter.SearchLetter)));
var query = result.Take(1000);
query.GetResult();
Thanks
Ravindra
Hi Rich,
Are you willing to search the "Search Text" in the fields on the ArticlePageType, right?
If I am not wrong then, here is the related link
Thanks,
Praful
Hi,
I am trying to create episerver Find query that requires different filters on different PageType
Here is the scenario
All PageTypes are driven from Abscrtact Class BasePage
so in Episerver Find query its easy to create a filter for all the PageTypes
var query= SearchClient.Instance.Search<BasePage>();
query= query.For("Search Tex"t).InFields(f => f.MetaTitle, f => f.MetaDescription);
query= query.Filter(x => x.ExcludeFromSearch.Match(false));
var batch = query.GetContentResult();
now for the PageType ArticlePageType I need to apply special multiple filters that are only relevant to that ArticlePageType. So how can I achieve this in the same query? the output should be IContentResult<BasePage>