I recently stumbled across the djapian project over at google code. I've been looking for a full-text indexer for Django for quite a while but hadn't found anything that I felt did what I wanted. The dead search-branch in Django's repository was so tempting but incomplete. I noticed the django-sphinx project during my initial searching months ago but what I felt it was lacking (which was a deal breaker for me) is the ability to search across multiple models. Djapian, however, has the ability to do just this. What I ultimatley wanted to be able to do was something like this:
>>> from search import indexer
>>> search = indexer.search('some search term')
>>> search.count()
2
>>> result = search[0]
>>> result.score
100
>>> for result in search:
... result.get_object()
...
Link
Posted by Tim at February 19, 2008 08:14 PM
| TrackBack