Skip to content
amcclosky edited this page Nov 3, 2011 · 18 revisions

Why Haystack?

Search in Django is painful and existing libraries/apps are spotty. The original Djangosearch works well for exact what it’s built for, but extension is hard/painful. So my goals are:

  • Enable searching on third-party apps without touching that app’s code.
  • Revise the way searching is done to be friendlier to the app developer.
  • Provide ample room to extend/override any part with relative ease and minimal changes.
  • Provide a means to have multiple indexes or limit the indexes registered.
  • Full working backends for all supported engines (listed in the docs).
  • Backends:
  • Solr
  • Lucene
  • Whoosh
  • Good test coverage.
  • Supply ample documentation for app developers.
  • New features (where supported by the backend):
  • Term Boost
  • More Like This
  • Faceting
  • Stored (non-indexed) fields
  • Highlighting
  • (Lofty ambition kicks in) Acceptance into django.contrib for Django 1.2.

What’s Done

There’s been a fair amount of progress. The current codebase has the following things complete/nearly complete:

  • Enable searching on third-party apps without touching that app’s code.
  • Revise the way searching is done to be friendlier to the app developer.
  • Provide ample room to extend/override any part with relative ease and minimal changes.
  • Provide a means to have multiple indexes or limit the indexes registered.
  • Decent test coverage of the core API.
  • Some documentation.
  • Refactored ModelIndexes.
  • Backends:
  • Solr
  • Whoosh
  • New features (where supported by the backend):
  • Term Boost
  • More Like This
  • Faceting
  • Stored (non-indexed) fields
  • Highlighting

What’s Left

The Whoosh backend could use a little further love to complete its API. It also suffers from locking issues and query parsing problems. The long term solution may be writing a standalone Whoosh server (much like Solr to Lucene) that handles locking intelligently and speaks HTTP.

In addition, I’d like to implement a reasonably complete Lucene backend.

A 1.0 release is blocking predominantly on the Lucene/Whoosh backends. However, there are a number of features & fixes I’d like to work in before that time. As of writing, Haystack is stable enough for production use with the understanding that things may change through time.

Clone this wiki locally