Skip to main content



Full Text Search in Django

What is Full Text Search?

According to Wikipedia, In a full-text search, a search engine examines all of the words in every stored document as it tries to match search criteria.
Elasticsearch is a search engine based on the Lucene library. It provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents.
PostgreSQL has been supporting Full-Text Search since 2008. Internally it uses “tsvecor” and “tsquery” data type to process the data to search. It has some indexes that can be used to speed up the search: GIN and GiST. PostgreSQL added support for Phrase Search in 2016. Support for JSON[B] Full-Text Search was added in version 10.
Implementing Full Text Search in DjangoWe''ll be using PostgreSQL for our implementation.

Let's assume the following cases are valid for our implementation:

We have an Author model with name fieldWe have created instances as follows: Author.object.create(name='Timothy Olaleke')Auth…

Latest posts

Apache Proxy Snippet for Exposing API on Sub-domain

Installing and Connecting to Multiple Versions of PostgreSQL on a Linux Machine

Heplful Docker Commands

How To Set Up Django with Postgres, Nginx, and Gunicorn on Ubuntu 18.04