solrpy Documentation
solrpy is a Python client for Apache Solr, an enterprise search server built on top of Apache Lucene.
solrpy allows you to add documents to a Solr instance, perform queries, and gather search results from Solr using Python.
Key features:
Supports Solr 1.2 through 10.x
Automatic version detection with runtime feature gating
Requires Python 3.10+
Contents
- Quick Start
- Installation
- Connecting to Solr
- Health check
- Adding documents
- Searching
- Atomic update (Solr 4.0+)
- Real-time Get (Solr 4.0+)
- Soft Commit (Solr 4.0+)
- MoreLikeThis (Solr 4.0+)
- JSON Facet API (Solr 5.0+)
- Cursor pagination (Solr 4.7+)
- Grouping / Field Collapsing (Solr 3.3+)
- KNN / Dense Vector Search (Solr 9.0+)
- Query builders (Field, Sort, Facet)
- Deleting documents
- Committing and optimizing
- Response format
- Using SearchHandler
- Solr Extract / Rich Documents (Solr 1.4+)
- Suggest (Solr 4.7+)
- Spellcheck (Solr 1.4+)
- Schema API (Solr 4.2+)
- Authentication
- SolrCloud
- Pydantic response models
- Streaming Expressions (Solr 5.0+)
- Async usage
- Migrating from pysolr
- Closing the connection
- API Reference
- Data representation
- Exceptions
- Solr class
- SearchHandler class
- Response class
- SpellcheckResult class (Solr 1.4+)
- Extract class (Solr 1.4+)
- Suggest class (Solr 4.7+)
- Grouping classes (Solr 3.3+)
- KNN / Dense Vector Search (Solr 9.0+)
- SolrCloud (Solr 4.0+)
- Query builders
- Schema API (Solr 4.2+)
- Streaming Expressions (Solr 5.0+)
- PysolrCompat class
- AsyncSolr class
- Paginator
- Response parsing
- Gzip compression
- Version Detection
- Changelog
- 2.0.8 (2026-03-27)
- 2.0.7.post1 (2026-03-27)
- 2.0.7 (2026-03-27)
- 2.0.6 (2026-03-27)
- 2.0.5 (2026-03-27)
- 2.0.4 (2026-03-27)
- 2.0.3 (2026-03-27)
- 2.0.2 (2026-03-27)
- 2.0.1 (2026-03-27)
- 1.12.0 (2026-03-27)
- 1.11.0 (2026-03-27)
- 1.10.1 (2026-03-27)
- 1.10.0 (2026-03-27)
- 1.9.2 (2026-03-27)
- 1.9.1 (2026-03-27)
- 1.9.0 (2026-03-27)
- 1.8.1 (2026-03-27)
- 1.8.0 (2026-03-27)
- 1.7.0 (2026-03-27)
- 1.6.0 (2026-03-27)
- 1.5.0 (2026-03-27)
- 1.4.2 (2026-03-27)
- 1.4.1 (2026-03-27)
- 1.4.0 (2026-03-27)
- 1.3.0 (2026-03-27)
- 1.2.0 (2026-03-27)
- 1.1.0 (2026-03-27)
- 1.0.9 (2026-03-27)
- 1.0.8 (2026-03-27)
- 1.0.7 (2026-03-27)
- 1.0.6 (2026-03-27)
- 1.0.5 (2026-03-27)
- 1.0.4 (2026-03-27)
- 1.0.3 (2026-03-27)
- 1.0.2 (2026-03-27)
- 1.0.1 (2026-03-27)
- 0.9.11 (2026-03-26)
- 0.9.10 (2026-03-26)
- 0.9.9 (2026-03-26)
- 0.9.8
- 0.9.7
- Prior versions