Whoosh 3.49.0 documentation¶
Whoosh is a fast, pure-Python full-text indexing, search, and spell-checking library. It adds ranked search — a query language, faceting, highlighting, and “did you mean?” spelling correction — to any Python program, with no compiler, no server, and no native dependencies. If you can open a file, you can build an index.
Try it live in your browser — no install needed — at the interactive demo. It runs the real library compiled to WebAssembly (via Pyodide) and answers your queries with BM25 ranking and highlighting, entirely client-side.
New here? Start with the Quick start.
Project status (2026): actively maintained again
This fork continues Whoosh — originally created by
Matt Chaput — after two rounds of abandonment,
now running on Python 3.10–3.14. Install it as pip install whoosh3.
You can report bugs and request features on the
issue tracker and
ask questions in
Discussions.
If Whoosh is useful to you, a ⭐ on
GitHub helps other people
find a search library that’s alive again.
Contents¶
- Release notes
- Quick start
- Migrating to whoosh3
- Command-line search: a ranked
grepfor a folder - Choosing a search tool: when is Whoosh a good fit?
- Adding full-text search to your Python app
- Cookbook
- Quick start
- A guided tour
- “Did you mean …?” spelling correction
- Autocomplete / search-as-you-type
- Whoosh vs. SQLite FTS5
- Faceted navigation (filter sidebar with counts)
- Highlighting and snippets
- Indexing signed numbers (keep the minus sign)
- Searching for acronyms and tech tokens (
R&D,C++,C#,.NET) - Custom analyzers (build your own text pipeline)
- Custom scoring & sorting (control the ranking)
- Closing indexes cleanly (and avoiding Windows file-lock errors)
- A command-line folder search tool
- A full-text search API with FastAPI
- A full-text search app with Flask
- A full-text search app with Django
- Adding search to a static site
- BM25 retrieval for RAG (hybrid search)
- Use Whoosh as a LangChain retriever
- Use Whoosh as a LlamaIndex retriever
- Migrating from Whoosh 2.x / whoosh-reloaded
- Introduction to Whoosh
- Glossary
- Designing a schema
- How to index documents
- How to search
- Parsing user queries
- The default query language
- Indexing and parsing dates/times
- Query objects
- About analyzers
- Improving recall (finding more matches)
- Stemming, variations, and accent folding
- Indexing and searching N-grams
- Sorting and faceting
- How to create highlighted search result excerpts
- Query expansion and Key word extraction
- “Did you mean… ?” Correcting errors in user queries
- Field caches
- Tips for speeding up batch indexing
- Concurrency, locking, and versioning
- Indexing and searching document hierarchies
- Whoosh recipes
- Whoosh API
analysismoduleclassifymodulecodec.basemodulecollectorsmodulecolumnsmodulefieldsmodulefiledb.filestoremodulefiledb.filetablesmodulefiledb.structfilemoduleformatsmodulehighlightmodulesupport.bitvectormoduleindexmodulelang.morph_enmodulelang.portermodulelang.wordnetmodulematchingmoduleqparsermodulequerymodulereadingmodulescoringmodulesearchingmodulesortingmodulespellingmodulesupport.charsetmodulesupport.levenshteinmoduleutilmodulewritingmodule
- Technical notes