Suppose you have Solr 4.10.4 , and you use the example directory , which contains the ready-made Solr configuration.
To install haystack, if you are using virtualenv, you first activate it and then run
pip install django-haystack
and use the Solr backend , you also need to install the module pysolrin your virtual
pip install pysolr
To add a haystack file to INSTALLED_APPSin settings.py
INSTALLED_APPS = (
'haystack',
)
And you need to set in settings.py ifle - the search engine backend to use the haystack:
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': 'http://127.0.0.1:8983/solr/the_core_you_created'
},
}
the_core_you_createdis the Solr core that you created for your application.
, , , serach, SearchIndexes.
, , , :
python manage.py build_solr_schema
solr/the_core_you_created/conf/schema.xml
:
python manage.py rebuild_index
.
haystack docs - - Django .