I want to use Find to create a filter based on the Category page names. Here's what I've got so far, the bit I can't figure out is line 4
ar result = _searchClient.Search()
.For(query)
.Filter(x => x.Ancestors().Match(rootPageLink.ID.ToString()))
.FilterFacet("Categories", x => x.ParentLink) // This doesn't work
.HistogramFacetFor(x => x.Price, 100)
.Skip((pageNumber - 1) * pageSize)
.Take(pageSize)
.GetContentResult();
Obviously this doesn't work because Filter() expects a Filter as the second argument but you can see what I'm trying to do. It's roughly analagous to a SQL `GROUP BY ParentLink` and then display info like
I've got a heirarchy of pages such as
I want to use Find to create a filter based on the Category page names. Here's what I've got so far, the bit I can't figure out is line 4
Obviously this doesn't work because Filter() expects a Filter as the second argument but you can see what I'm trying to do. It's roughly analagous to a SQL `GROUP BY ParentLink` and then display info like
Category 1 (2 pages)
Category 2 (1 page)