Skip to content

Instantly share code, notes, and snippets.

@chriskief
Created May 14, 2014 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chriskief/1f28dc09ac715cadc060 to your computer and use it in GitHub Desktop.
Save chriskief/1f28dc09ac715cadc060 to your computer and use it in GitHub Desktop.
# 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