---
title: Filter facets
slug: cms-12/docs/filter-facets
docTags: 
createdAt: 2026-08-10T15:55:56.000Z
---

A filter facet returns a count of search results that match a filter. The filter can be an expression used with the [Filter method](docId\:lp43UeoIMhZUe5iubyEWz), ranging from a single criterion to complex criteria of multiple sub-criteria.

To request a filter facet, the `FilterFacet` method has two parameters: name and filter or filter expression. You retrieve the resulting facet from the search results object using a method with the same name but with only a name parameter. The returned object has a single property, `Count`, the number of documents matching the search query and filter.

The following example shows a sample search for products that requests and retrieves the value from two filter facets.

```csharp
var result = client.Search<Product>()
  .FilterFacet("In stock", x => x.InStock.Match(true))
  .FilterFacet("In stock on sale",
    x => x.InStock.Match(true) & x.OnSale.Match(true))
  .GetResult()

int inStock = result.FilterFacet("In stock").Count;

int inStockAndOnSale = result
  .FilterFacet("In stock on sale").Count;
```
