Skip to content

Instantly share code, notes, and snippets.

@chriskief

chriskief/config.py

Created May 14, 2014
Embed
What would you like to do?
# add to installed apps
INSTALLED_APPS = (
...
'haystack',
...
)
# haystack search using elasticsearch
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
'URL': 'http://127.0.0.1:9200/',
'INDEX_NAME': 'haystack',
},
}
# http://django-haystack.readthedocs.org/en/latest/signal_processors.html
HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor'
# increase the default number of results (from 20)
HAYSTACK_SEARCH_RESULTS_PER_PAGE = 40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment