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
In case someone else stumbles on this, because it's not documented anywhere, I managed to figure this out.
var mainQuery = new GroupQuery(LuceneOperator.AND); var categoryQuery = new CategoryQuery(LuceneOperator.AND); foreach (int categoryId in CurrentPage.Category) { categoryQuery.Items.Add(categoryId.ToString()); } mainQuery.QueryExpressions.Add(categoryQuery); var result = SearchHandler.Instance.GetSearchResults(mainQuery, 1, 20);
Cheers
Fredrik
Hi!
I'm trying to use EPiServer Search and CategoryQuery to filter a search on categories without success.
Has anyone done that and could share an example?
Br
Erik Jonsson