I'm Priya Sundaram, the current maintainer of whoosh3 — the actively-maintained fork of the pure-Python Whoosh full-text search library. Every snippet below is verified against the current release (3.48.0).

You know the sidebar on every shopping site: Category (3), Brand (2), Price $0–100 (3) — click one and the list narrows, the counts update. That UI has a name: faceted search. It looks like the kind of thing you need Elasticsearch or Algolia for.

You don't. If your catalog is a few thousand rows, you can build the whole thing — ranked search and the counted facet sidebar and drill-down — with an embedded, pure-Python index. No server, no C extension, no API key. Here's how.

The data

from whoosh.fields import Schema, TEXT, KEYWORD, NUMERIC