#HAYSTACK_SETTINGS
ENABLE_HAYSTACK_SEARCH = True
#Uncomment for multilingual setup:
#HAYSTACK_ROUTERS = ['askbot.search.haystack.routers.LanguageRouter',]
#Uncomment if you use haystack #More info in http://django-haystack.readthedocs.org/en/latest/settings.html
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',
'URL': 'http: //10.0.1.201:8080/solr'
}
}
$ pip freeze |grep haystack django-haystack==2.0.0
$ python manage.py build_solr_schema > /tmp/schema.xml
WARNING!!! You are using a 'locmem' (local memory) caching backend,
which is OK for a low volume site running on a single-process server.
For a multi-process configuration it is neccessary to have a production
cache system, such as redis or memcached.
With local memory caching and multi-process setup you might intermittently
see outdated content on your site.
/usr/local/lib/python2.7/dist-packages/Coffin-0.3.7-py2.7.egg/coffin/common.py:73: UserWarning: Cannot translate loader: askbot.skins.loaders.Loader
warnings.warn('Cannot translate loader: %s' % loader)
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_manager(settings)
File "/usr/local/lib/python2.7/dist-packages/Django-1.4.5-py2.7.egg/django/core/management/__init__.py", line 459, in execute_manager
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/Django-1.4.5-py2.7.egg/django/core/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/Django-1.4.5-py2.7.egg/django/core/management/base.py", line 196, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.7/dist-packages/Django-1.4.5-py2.7.egg/django/core/management/base.py", line 232, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/dist-packages/haystack/management/commands/build_solr_schema.py", line 24, in handle
schema_xml = self.build_template(using=using)
File "/usr/local/lib/python2.7/dist-packages/haystack/management/commands/build_solr_schema.py", line 50, in build_template
c = self.build_context(using=using)
File "/usr/local/lib/python2.7/dist-packages/haystack/management/commands/build_solr_schema.py", line 36, in build_context
raise ImproperlyConfigured("'%s' isn't configured as a SolrEngine)." % backend.connection_alias)
django.core.exceptions.ImproperlyConfigured: 'default' isn't configured as a SolrEngine).
Sorry forgot the stdout:
root@askbot-testvm:/srv/askbot# ./manage.py rebuild_index
WARNING: This will irreparably remove EVERYTHING from your search index.
Your choices after this are to restore from backups or rebuild via the `rebuild_index` command.
Are you sure you wish to continue? [y/N] y
Removing all documents from your index because you said so.
All documents removed.
Indexing 16 people.
/usr/local/lib/python2.7/dist-packages/Coffin-0.3.7-py2.7.egg/coffin/common.py:73: UserWarning: Cannot translate loader: askbot.skins.loaders.Loader
warnings.warn('Cannot translate loader: %s' % loader)
Traceback (most recent call last):
File "./manage.py", line 11, in <module>
execute_manager(settings)
File "/usr/local/lib/python2.7/dist-packages/Django-1.4.5-py2.7.egg/django/core/management/__init__.py", line 459, in execute_manager
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/Django-1.4.5-py2.7.egg/django/core/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr ...
(more)