private SearchResultFacet CreateFacet(IQuery query, FacetCategory resultCategory, IQueryFacet definition)
        {
            var facetValues = this.CreateFacetValues(resultCategory, query).ToArray();

            if (!facetValues.Any())
            {
                return(null);
            }
            var facet = new SearchResultFacet
            {
                Definition = definition,
                Values     = facetValues
            };

            this.FormatFacet(facet);

            return(facet);
        }
 private void FormatFacet(SearchResultFacet facet)
 {
     this.FormatBooleanFacetService.Format(facet);
 }