Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (22 sloc) 0.82 kb

Creating New Backends

The process should be fairly simple.

  1. Create new backend file. Name is important.
  2. Two classes inside.
    1. SearchBackend (inherit from haystack.backends.BaseSearchBackend)
    2. SearchQuery (inherit from haystack.backends.BaseSearchQuery)

SearchBackend

Responsible for the actual connection and low-level details of interacting with the backend.

  • Connects to search engine
  • Method for saving new docs to index
  • Method for removing docs from index
  • Method for performing the actual query

SearchQuery

Responsible for taking structured data about the query and converting it into a backend appropriate format.

  • Method for creating the backend specific query - build_query.
Jump to Line
Something went wrong with that request. Please try again.