The current implementation of ContentCategoriesFacet() is nice in that it wraps up the facets for categories really nicely. However the default facet size is 10 and since this method does not take any other arguments, you cannot override the facet limit while using this method.
In order to facilitate my client's needs, I've have to look at what the ContentCategoriesFacet() method is doing in order to supply my own limit.
Work around:
var results = query.FilterForVisitor()
.Skip(request.From)
.Take(request.Take)
.OrderByDescending(x => x.StartPublish)
//.ContentCategoriesFacet()
.TermsFacetFor(x => x.Categories(), y => y.Size = 100 )
.GetContentResult();
Potential overloads options:
public static ITypeSearch<T> ContentCategoriesFacet<TSource>(this ITypeSearch<T> search, Action<TermsFacetRequest> facetRequestAction)
public static ITypeSearch<T> ContentCategoriesFacet<TSource>(this ITypeSearch<T> search, int size = 10)
The current implementation of
ContentCategoriesFacet()
is nice in that it wraps up the facets for categories really nicely. However the default facet size is 10 and since this method does not take any other arguments, you cannot override the facet limit while using this method.In order to facilitate my client's needs, I've have to look at what the
ContentCategoriesFacet()
method is doing in order to supply my own limit.Work around:
Potential overloads options: