tags:

views:

196

answers:

5

Is there a easy way to add a search capability on fields in Django? Also please let me know what is Lucene search.

+4  A: 
  1. Try Haystack. It's pretty easy to setup.
  2. Apache Lucene is full-text search engine written in Java.
PiotrLegnica
+1  A: 

I second the Haystack suggestion. Here's a good blog post about it. In fact, the entire series—Large Problems in Django, Mostly Solved—is excellent reading. Here's a Google search that should find most of the entries.

Hank Gay
+2  A: 

I would use Haystack as mentioned above together with Xapian.

Xapian doesn't require you to run it as a process (which is some sort of advantage in my opinion).

Erik Aigner
A: 

Haystack setup on my blog application took me <30 min as Django newbie. I can strongly recommend it.

Kenny M.
+1  A: 

If your database is MySQL don't underestimate the power of QuerySet's search method. It uses MySQL's full-text index (assuming you've created one) to do full-text searching. It's the quickest to set up of all the options (it's built in!) and depending on your requirements it may be enough. If not, I also think Haystack is a good suggestion.

Matt Baker