[ACCEPTED]-What's the best Django search app?-search-engine
Check out Haystack Search - a new model based search abstraction 2 layer that currently supports Xapian, Solr and Whoosh. Looks 1 like it's well supported and documented.
Justin, I'd try djangosearch first: Jacob Kaplan-Moss 2 (Django's lead developer) is working on 1 it.
Potential hazards:
- The home page warns the API might not be entirely stable
Potential benefits:
- “The long term goal is for this to become
django.contrib.search
.”
I am searching for the same thing, as are 6 a lot of other people. Let's hope that django.contrib.search will 5 be added soon.
In the meantime, this is what 4 I found:
- http://code.google.com/p/djangosearch/
- http://code.google.com/p/django-sphinx/
- http://code.google.com/p/djapian/
- http://code.google.com/p/django-search-lucene/
- http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/
To me, most look quite complicated 3 and, frankly, a little daunting to implement. I'd 2 be interested to learn what you think of 1 these.
The google code page for djangosearch indicates that 2 it is no longer under active development, and 1 suggests haystack or solango.
I'd recommend Sphinx for full-text search 12 and aggregation, and django-sphinx is good 11 enough for production use. We found that 10 Sphinx was the least resource-intensive 9 and fastest way to index and search our 8 documents and that django-sphinx was a nice 7 wrapper on top of the sphinx client.
The 6 group by aggregation is particularly nice, if 5 for example you want to display how many 4 documents with a certain tag or by a certain 3 author (or both) matched a search. In memory 2 attribute updates were convenient too, especially 1 for removing deleted articles immediately.
Thanks Garth. I had seen that djangosearch 5 wanted to become the official Django search, but 4 I was hesitant to use it because I couldn't 3 find any documentation! Luckily, there's 2 a README in subversion that I hadn't seen before, and it makes 1 the API look very cool:
# set up the model
class Event(models.Model):
title = models.CharField(max_length=255)
date = models.DateField()
is_outdoors = models.BooleanField()
index = djangosearch.ModelIndex(text=['title'],
additional=['date', 'is_outdoors'])
# run a search
results = Event.index.search("django conference")
I just needed a very quick solution that was no-fuss 6 for an internal app.
I found the article 5 Adding search to Django in a snap, and that worked splendid for me!
Obviously 4 it lacks the speed, scalability and features 3 of the real projects like Haystack, but 2 this one is easier to set up, and I don't 1 really need anything else than keyword AND-search.
You might want to consider letting Yahoo 3 do all the hard work with their Build your 2 own Search Service (BOSS). Here is a great 1 blog post that walks you through the process: http://www.peterkrantz.com/2008/yahoo-search-in-django/
It looks like everyone here missed django-xappy
After 6 quick evaluation of all existing search 5 addons for Django, I found this one as most 4 flexible and easiest to use. It's rough 3 on the edges in few places, but it's still 2 the best way to use power of Xapian search engine 1 inside Django projects.
You might want to look at Django Solr search (aka "Solango") which 2 comes with some nice documentation to get 1 you started...
If you have large amount of data to be indexed 4 or you expect high traffic, I'd suggest 3 using some external search engine, like 2 Solr. This way, you'll keep shared-nothing approach and be 1 able to scale your site components independently.
I think I am going to have to give a shout 6 out to Djapian.
It is rock-solid...just pull 5 down a source distribution and peek inside. Top 4 notch code, not very many comments tho..
It's 3 still a young software project, but I think 2 the django community should throw it's weight 1 behind this one.
Thanks Joe,
We decided to go with Tsearch2 6 and a custom postgres adaptor. Tsearch2 5 does not need an extra process to run, which 4 was convenient since we are on a WebFaction 3 hosting with limited memory... It's not 2 completely done yet, but seems to be a good 1 solution...
I found Djoosh which relies on the pure-python 2 external search engine Whoosh to work well with 1 my 'Python' brain.
If you are willing to use a 3rd party search 4 engine I can recommend Yahoo BOSS and django-bosssearch.
Yahoo BOSS 3 is a paid service, but it saves you setting 2 up and maintaining other search software 1 on your server.
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.