celery-haystack 0.8

An app for integrating Celery with Haystack.

This Django app allows you to utilize Celery for automatically updating and deleting objects in a Haystack search index.

Requirements

You also need to install your choice of one of the supported search engines for Haystack and one of the supported backends for Celery.

Installation

Use your favorite Python package manager to install the app from PyPI, e.g.:

pip install celery-haystack

By default a few dependencies will automatically be installed:

Usage

Haystack 1.X

  1. Add 'celery_haystack' to the INSTALLED_APPS setting

    INSTALLED_APPS = [
        # ..
        'celery_haystack',
    ]
    
  2. Alter all of your SearchIndex subclasses to inherit from celery_haystack.indexes.CelerySearchIndex

    from haystack import site, indexes
    from celery_haystack.indexes import CelerySearchIndex
    from myapp.models import Note
    
    class NoteIndex(CelerySearchIndex):
        text = indexes.CharField(document=True, model_attr='content')
    
    site.register(Note, NoteIndex)
    
  3. Ensure your Celery instance is running.

Haystack 2.X

  1. Add 'celery_haystack' to the INSTALLED_APPS setting

    INSTALLED_APPS = [
        # ..
        'celery_haystack',
    ]
    
  2. Enable the celery-haystack signal processor in the settings

    HAYSTACK_SIGNAL_PROCESSOR = 'celery_haystack.signals.CelerySignalProcessor'
    
  3. Alter all of your SearchIndex subclasses to inherit from celery_haystack.indexes.CelerySearchIndex and haystack.indexes.Indexable

    from haystack import indexes
    from celery_haystack.indexes import CelerySearchIndex
    from myapp.models import Note
    
    class NoteIndex(CelerySearchIndex, indexes.Indexable):
        text = indexes.CharField(document=True, model_attr='content')
    
        def get_model(self):
            return Note
    
  4. Ensure your Celery instance is running.

Thanks

This app is a blatant rip-off of Daniel Lindsley's queued_search app but uses Ask Solem Hoel's Celery instead of the equally awesome queues library by Matt Croyden.

Issues

Please use the Github issue tracker for any bug reports or feature requests.

Author

Jannis Leidel

Pip

celery-haystack==0.8

Classifiers

  • Topic :: Utilities
  • Programming Language :: Python :: 3.4
  • Programming Language :: Python :: 3.3
  • Programming Language :: Python :: 2.7
  • Programming Language :: Python :: 2.6
  • Programming Language :: Python
  • Operating System :: OS Independent
  • License :: OSI Approved :: BSD License
  • Intended Audience :: Developers
  • Framework :: Django
  • Environment :: Web Environment
  • Development Status :: 4 - Beta
File Type Python Version Uploaded On Downloads
celery_haystack-0.8-py2.py3-none-any.whl Wheel 2.7 July 31, 2014 1,792
celery-haystack-0.8.tar.gz Source July 31, 2014 854
Version Release Date
0.8 July 31, 2014
0.7.2 March 23, 2013
0.7.1 March 9, 2013
0.7 March 9, 2013
0.6.2 June 28, 2012
0.6.1 June 27, 2012
0.6 June 27, 2012
0.5 May 23, 2012
0.4 Sept. 17, 2011
0.3.1 Aug. 22, 2011
0.3 Aug. 22, 2011
0.2.1 Aug. 5, 2011
0.2 Aug. 4, 2011
0.1.3 Aug. 1, 2011
0.1.2 July 31, 2011
0.1.1 July 29, 2011
0.1 July 29, 2011
Date Package Version Action
Nov. 4, 2014, 11:45 a.m. celery-haystack 0.1.2 Release Created
Nov. 4, 2014, 11:45 a.m. celery-haystack 0.3 Release Created
Nov. 4, 2014, 11:45 a.m. celery-haystack 0.1.3 Release Created
Nov. 4, 2014, 11:45 a.m. celery-haystack 0.6 Release Created
Nov. 4, 2014, 11:45 a.m. celery-haystack 0.5 Release Created
Nov. 4, 2014, 11:45 a.m. celery-haystack 0.1.1 Release Created
Nov. 4, 2014, 11:45 a.m. celery-haystack 0.2.1 Release Created
Nov. 4, 2014, 11:45 a.m. celery-haystack 0.7.1 Release Created
Nov. 4, 2014, 11:45 a.m. celery-haystack 0.7 Release Created
Nov. 4, 2014, 11:45 a.m. celery-haystack 0.4 Release Created
Nov. 4, 2014, 11:45 a.m. celery-haystack 0.7.2 Release Created
Nov. 4, 2014, 11:45 a.m. celery-haystack 0.3.1 Release Created
Nov. 4, 2014, 11:45 a.m. celery-haystack 0.6.1 Release Created
Nov. 4, 2014, 11:45 a.m. celery-haystack 0.6.2 Release Created
Nov. 4, 2014, 11:45 a.m. celery-haystack 0.1 Release Created
Nov. 4, 2014, 11:45 a.m. celery-haystack 0.2 Release Created
Nov. 4, 2014, 11:45 a.m. celery-haystack 0.8 Release Created
Nov. 4, 2014, 11:45 a.m. celery-haystack Package Created