What facets are
Facets are structured attributes of documents, like brand, price range, or color. Faceted navigation lets users narrow results by selecting facet values and shows a count next to each value.
Computing facets
For a result set, the engine aggregates how many documents fall into each facet value. This aggregation runs over the matched documents, not the whole corpus, so counts reflect the current query.
Keeping it fast
- Column oriented storage of facet fields makes aggregation quick.
- Precomputed counts help for common queries.
- Cardinality limits cap how many values a facet displays.
Multi select behavior
When a user selects a brand, results filter to that brand, but the brand facet itself often still shows other brands so the user can switch. Other facets recompute counts under the new filter. Getting this interaction right is a common design subtlety.
Diagram
Key idea
Faceted navigation aggregates matched documents into per value counts so users can refine along structured dimensions interactively.