O'Reilly logo

Django By Example by Antonio Melé

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding a search engine with Solr and Haystack

Now, we are going to add search capabilities to our blog. The Django ORM allows you to perform case-insensitive lookups using the icontains filter. For example, you can use the following query to find posts that contain the word framework in their body:

Post.objects.filter(body__icontains='framework')

However, if you need more powerful search functionalities, you have to use a proper search engine. We are going to use Solr in conjunction with Django to build a search engine for our blog. Solr is a popular open-source search platform that offers full-text search, term boosting, hit highlighting, faceted search, and dynamic clustering, among other advanced search features.

In order to integrate Solr in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required