Solr python interface – Sunburnt fork

I forked tow (Toby White, gratitude for his great work) sunburnt repository from github because I needed range facet funcionality and the workaround (with the filter queries) wasn’t quite what I wanted.

You can checkout here: https://github.com/charlesnagy/sunburnt

Docs about it:

Range facets

More about range facets see: http://wiki.apache.org/solr/SimpleFacetParameters#Facet_by_Range

Now sunburnt support range facets as well. Every range field can be set separately in order to fulfill the requirements. The facet_ranger.update() method takes a dictionary with the field names and the essential parameters (start, end and gap).

Simple usage

Full example

Comments and ideas are welcomed.

 

You might like these too

Python error: AttributeError: __exit__ I just had a 30 minutes worth of debugging on a stupid mistake I made. I wanted to check the free space on the target server before I actually start t...
Python MySQLdb vs mysql-connector query performanc... There are a lot of python driver available for MySQL and two stand out the most. The one, traditionally everybody's choice, sort of industrial standar...
Useful python – Class based decorators and c... There are many things why Pyhton is my standard go-to language if it comes to implement something. It's either a website, automation, data-mining or c...