In this chapter
We'll meet faceted search and filtering — narrowing a ranked result set by real, clickable categories with live counts (search-flavored aggregations) — and see honestly what this course's own Search Playground's simple UI does and doesn't expose, versus what the underlying engine actually supports.
The Problem in Real Life
GreenMart's catalog search finally works. Ranked, typo-tolerant, genuinely useful. Then Mike searches "jacket" and gets forty real results — every jacket-shaped product GreenMart sells, all correctly matched, all relevant enough to show up.
Forty is too many to scroll through by hand. Mike wants what every real shopping site already gives a customer: a way to narrow this down without typing a more specific search.
Forty results is technically correct. Nobody's going to look at all forty.
Mike
A Ranked List vs. A Ranked List You Can Narrow
Filtering narrows an already-ranked list
The same filtering concept as every other database in this course — narrow to documents matching an exact condition.
Faceted search makes filtering visible
Real, available categories shown as clickable options, instead of a customer needing to already know what to filter by.
Facet counts are a search-flavored aggregation
A live count of matching documents per facet value — computed alongside the ranked results, not a separate step.
A real capability, an honest UI gap
This Playground's engine supports filtering; its simple two-file UI just doesn't expose a facet sidebar to click.
Faceted Search & Filtering
Filtering search results is the straightforward half of this: narrow the ranked list down to only documents matching some exact condition — category is "Outdoor," price is under $50 — the same filtering concept every database in this course has already had its own version of.
Faceted search is filtering made visible and interactive: instead of a customer having to know in advance that "Outdoor" is a valid category to filter by, the search results page shows every real, available category as a clickable option — usually with a count next to each one.
| Category (a facet) | Matching Products |
|---|---|
| Outdoor | 2 |
| Electronics | 2 |
| Home | 1 |
These are the real, hand-verifiable counts for this course's own Search Playground's default 5-document catalog — 2 Outdoor products, 2 Electronics, 1 Home. A real faceted search UI computes and shows exactly this kind of breakdown, live, next to each filter option.
Those counts — "Outdoor (2), Electronics (2), Home (1)" — are an aggregation, in the search sense of the word: not a mathematical sum over a customer's orders the way this course's earlier Acts used the term, but a live count of how many currently-matching documents fall into each facet value. A real search engine computes these aggregations alongside the ranked results themselves, in the same request, so the filter sidebar always reflects exactly what's actually available to narrow down to.
Worth being precise about: this course's own Search Playground genuinely supports filtering underneath — the real engine behind it accepts a filter condition as a real option. But the Playground's own simple, two-file interface (Documents and Query) doesn't expose a filter or facet control for a reader to click — there's no checkbox sidebar here, only the plain query box. That's a gap in this particular teaching tool's UI, not a missing capability of the real technology it's built on; a production search UI, including the one sketched in this Act's own hero image, builds exactly that sidebar on top of the same underlying filtering mechanism.
Key Takeaway
Faceted search turns filtering from something a customer has to already know how to ask for into something the interface shows them, live, with real counts attached — the same underlying filter mechanism as any other database's WHERE clause, made interactive and visible instead of typed blind.
Why This Matters
A ranked list of results only stays useful up to a certain size — faceted search is the real, standard way production catalogs stay usable at real scale, narrowing a large ranked result set down without losing the relevance ranking underneath it.
GreenMart now has a name for the filter sidebar every real shopping site uses, and knows it's built on the same filtering idea already familiar from earlier in this course. None of this has addressed what happens once GreenMart's catalog and search traffic outgrow a single machine, though — exactly where the next chapter goes.
