Welcome to mysolr’s documentation!

mysolr was born to be a fast and easy-to-use client for Apache Solr’s API and because existing Python clients didn’t fulfill these conditions.

Since version 0.5 mysolr supports Python 3 except concurrent search feature.

Basic Usage

from mysolr import Solr

# Default connection to localhost:8080
solr = Solr()

# All solr params are supported!
query = {'q' : '*:*', 'facet' : 'true', 'facet.field' : 'foo'}
response = solr.search(**query)

# do stuff with documents
for document in response.documents:
    # modify field 'foo'
    document['foo'] = 'bar'

# update index with modified documents
solr.update(response.documents, commit=True)

References

We would like to thank the following developers their work and inspiration:

mysolr is a simple Apache Solr library for Python. You are currently looking at the documentation of the development release.

Feedback

Feedback is greatly appreciated. If you have any questions, comments, random praise, or anonymous threats, shoot me an email.

Useful Links

Fork me on GitHub