How to Connect a Haystack Website to Apache Solr using SearchStax by Measured Search


SearchStax® by Measured Search® can be used to enable Apache Solr on a Django Haystack website.

Django and Haystack

Django is an open-source Python Web framework that encourages rapid website development and easy integration with an underlying database.

If your website was built using Django, you should investigate the Haystack extension. It integrates with Django to provide views, templates, and APIs for a website search page connected to an underlying search engine such as Apache Solr. There are page templates for query-only and faceted search.

Haystack and Solr

Haystack is compatible with any newly-created SearchStax deployment.

The Haystack documentation indicates that Haystack 2.6.0 (the latest stable version) is compatible with Solr 6.x versions. (It is also possible to use Haystack with Solr 4.x versions, but the setup is much more complicated.)

Connecting to Solr

See Getting Started with Haystack - Configuration for the details of configuring Haystack. At one point you must edit to add the URL of the Solr instance. SearchStax Haystack Django
Use the Solr Load Balancer URL from your SearchStax dashboard. Screenshot