what is Haystack for Django?

1.5k views Asked by At

I have been reading about Haystack,Whoosh,Xapian,etc. however I didn't really get what they are exactly used for and what is the relationship between them. For example, it is said that

Enable searching on third-party apps without touching that app’s code.

Can some explain to me what these are used for maybe giving a nice link and simple enough to understand for a begginer. thx

1

There are 1 answers

0
Matt Ball On BEST ANSWER

Haystack is a different beast from Whoosh/Xapian/etc.:

Haystack provides modular search for Django. It features a unified, familiar API that allows you to plug in different search backends (such as Solr, Whoosh, Xapian, etc.) without having to modify your code.

From the FAQ (emphasis added):

What is Haystack?

Haystack is meant to be a portable interface to a search engine of your choice. Some might call it a search framework, an abstraction layer or what have you. The idea is that you write your search code once and should be able to freely switch between backends as your situation necessitates.

The "search backends" mentioned are search libraries which have their own API. Haystack provides a unified API on top (and independent) of any one specific search library.