Skip to main content

Use redis as a persistence layer for Whoosh and Haystack

Project description

A Whoosh storage engine using redis for persistence. A Haystack SearchBackend subclass is also provided. Normally the STORAGE key could just be set but Haystack 2.0.0alpha 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.

Usage

Configure your Haystack connections in settings.py:

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

haystack-redis-0.0.1.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

haystack_redis-0.0.1-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page