Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.
/ haystack-redis Public archive

Simple solution to get Haystack running on a Heroku instance without external services

License

Notifications You must be signed in to change notification settings

jokull/haystack-redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

haystack-redis

A Whoosh storage engine using redis for persistance. A Haystack SearchBackend subclass is also provided. Normally the STORAGE key could just be set but Haystack 2.0.0beta is only aware of file and ram backends.

This is especially useful for small sites hosted on Heroku, which does not allow writing to local disk. The REDISTOGO_URL environment variable is read, falling back to the localhost default port.

Code is based on maxpert’s snippet (see blog post)

Usage

Configure your Haystack connections in settings.py:

import tempfile
HAYSTACK_CONNECTIONS = {
    'default': {
        'ENGINE': 'haystack_redis.RedisEngine',
        'PATH': tempfile.gettempdir(),
    },
}

Installation

Currently some in-development features are still needed:

$ pip install -e git+https://github.com/andymccurdy/redis-py.git@master@egg=redis
$ pip install -e git+https://github.com/toastdriven/django-haystack.git@master#egg=django-haystack
$ pip install -e git+https://github.com/jokull/haystack-redis.git@master#egg=haystack-redis

About

Simple solution to get Haystack running on a Heroku instance without external services

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages