This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class NestedFacetExtensions | |
{ | |
// Allow passing Action<NestedTermsFacetRequest> facetRequestAction (in order to set for example Size on the request) | |
public static ITypeSearch<TSource> TermsFacetFor<TSource, TListItem> | |
(this ITypeSearch<TSource> search,Expression<Func<TSource, IEnumerable<TListItem>>> nestedFieldSelector, | |
Expression<Func<TListItem, string>> itemFieldSelector, | |
Expression<Func<TListItem, Filter>> filterExpression = null, | |
Action<NestedTermsFacetRequest> facetRequestAction = null) | |
{ | |
var facetFilter = NestedFilter.Create(search.Client.Conventions, nestedFieldSelector, filterExpression); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class NestedTermsFacetExtensions | |
{ | |
public static ITypeSearch<TSource> NestedTermsFacetFor<TSource, TEnumerable>( | |
this ITypeSearch<TSource> search, | |
Expression<Func<TSource, IEnumerable<TEnumerable>>> enumerableFieldSelector, Expression<Func<TEnumerable, string>> itemFieldSelector) | |
{ | |
return search.AddNestedTermsFacetFor(enumerableFieldSelector, itemFieldSelector, null); | |
} | |
public static ITypeSearch<TSource> NestedTermsFacetFor<TSource, TEnumerable>( |
OlderNewer