public static coreModel.AggregationItem ToModuleModel(this searchModel.Facet facet, params string[] appliedFilters)
 {
     var result = new coreModel.AggregationItem
     {
         Label = facet.Name,
         Value = facet.Key,
         Count = facet.Count,
         IsApplied = appliedFilters.Any(x => x.Equals(facet.Key, StringComparison.OrdinalIgnoreCase))
     };
     return result;
 }
        public static coreModel.AggregationItem ToModuleModel(this searchModel.Facet facet, params string[] appliedFilters)
        {
            var result = new coreModel.AggregationItem
            {
                Value = facet.Key,
                Count = facet.Count,
                IsApplied = appliedFilters.Any(x => x.Equals(facet.Key, StringComparison.OrdinalIgnoreCase))
            };

            if (facet.Labels != null)
            {
                result.Labels = facet.Labels.Select(ToModuleModel).ToArray();
            }

            return result;
        }