Pure Python library whoosh3 can power faceted search without Elasticsearch or APIs
Priya Sundaram, maintainer of whoosh3 — an actively maintained fork of the pure-Python Whoosh full-text search library — has demonstrated how to build faceted search entirely in Python without any external server or API. Faceted search is the sidebar feature common on shopping sites that displays category, brand, and price filters with live counts that update as users drill down. Using whoosh3 version 3.48.0, the implementation requires only a schema definition, an embedded index, and a single groupedby argument on a search call to generate facet counts. The library also supports numeric range bucketing for price filters and can recompute facet counts dynamically against any text search query. When a user selects a filter, a lightweight filter parameter is added to the existing query rather than rerunning the full search, keeping the process efficient.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in