Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Python Solr binding
branch: dev

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
docs More doc updates
mysolr
tests Utility function to convert datetimes into ISO8601 format
.gitignore
.travis.yml Fixes solr 3.X tests
AUTHORS Updates contributors
CHANGELOG.rst Bumps version to 0.8.3
LICENSE
MANIFEST.in Added MANIFEST.in
README.rst Update README.rst
setup.py Bumps version to 0.8.3

README.rst

https://secure.travis-ci.org/RedTuna/mysolr.png?branch=master https://coveralls.io/repos/RedTuna/mysolr/badge.png?branch=dev https://pypip.in/d/mysolr/badge.png https://pypip.in/license/mysolr/badge.png

mysolr

Fast python solr binding. Check full documentation here

Features

  • Full query syntax support
  • Facets support
  • Highlighting support
  • Spellchecker support
  • More like this support
  • Stats support
  • Concurrent searchs
  • Python 3 compatible

Installation

From source code:

python setup.py install

From pypi:

pip install mysolr

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)
Something went wrong with that request. Please try again.