An example of using Solr with Django
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


WARNING: This project is no longer supported

The source data for this project is no longer available.

Since this is an example against a version of Solr that is three major versions out of date, I will not be maintaining this example.

Please feel free to refer to the solrcloudpy project -- specifically the test library -- for examples of interactions with a modern solr deployment.


An example use case for Apache Solr

This is an example Django site that allows us to better understand how to work with Solr. It is indended to be an accompaniment to the screencast collection Getting Started with Apache Solr Search Server, to be distributed by Packt Publishing.

An advanced branch includes commits outlining how to include:

  • spellcheck
  • grouped results
  • match highlighting
  • the MoreLikeThis request handler


How To Use

  • Make sure you have your requirements installed
  • Copy the schema file in the solrFiles folder to apache-solr/example/solr/conf/schema.xml (it's optimal to do this from a fresh unzip)
  • Start or restart your solr instance ("java -jar start.jar" from apache-solr/example)
  • Call "python" from the BeerSite project root directory
  • From the BeerSite project root directory, call "python runserver 8080"
  • Navigate to localhost:8080 in your web browser. You should be ready to search!


  • Introduce Filter Queries
  • Add an optional parameter to the search view function for brewer_name filter query
  • Implement brewer name filter query when querying solr
  • Deliver data to view in such a way that filtering between brewers for the same search term only requires clicking
  • Add ABV
  • Update the Schema File to Include ABV
  • Update the ETL script to add ABV data
  • Display ABV in each search result
  • Add option to sort by relevance, weakest (ABV ascending) and strongest (ABV descending)