November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
var query = SearchCilent.Instance.Search<SitePageData>();
var catalogBuilder = searchInstance.BuildFilter<SitePageData>();
foreach (int category in categoryIds)
catalogBuilder = catalogBuilder.And(x => x.Category.Match(category));
result = query.Filter(catalogBuilder).GetContentResult;
Think something like that should do the trick.
Hi,
I need to find content where multiple categories are set.
In this code I want to find all SitePageData where Category is 2 AND 3. I thought the DelegateFilterBuilder "In" would help me with this but it seem to handle it as 2 OR 3.
Is there some smart way to do this?
var categoryIds = new List<int> { 2, 3 };
var result = SearchClient.Instance.Search<SitePageData>()
.Filter(c => c.Category.In(categoryIds))
.GetContentResult();
Thanks!