Skip to main content

PostgreSQL full text search backend for Wagtail CMS

Project description

A PostgreSQL full text search backend for Wagtail CMS.


PostgreSQL full text search in Wagtail requires PostgreSQL >= 9.2, Django >= 1.10 and Wagtail >= 1.8.

First, install the module using:

pip install wagtail-pg-search-backend

Then you’ll need to do a little bit of configuration.

Add the following to the project settings:


    'default': {
        'BACKEND': 'wagtail_pgsearchbackend.backend',
        'SEARCH_CONFIG': 'english'

Then run migrations to add the required database table:

./ migrate wagtail_pgsearchbackend


The SEARCH_CONFIG key takes a text search configuration name. This controls the stemming, stopwords etc. used when searching and indexing the database. To get a list of the available config names use this query:

SELECT cfgname FROM pg_catalog.pg_ts_config


Install the package and dev requirements:

pip install -e . -r requirements-dev.txt

Creating migrations

First create a database:

createdb -Upostgres wagtail_pgsearchbackend

Then call makemigrations using the test settings:

django-admin makemigrations --settings=tests.settings


To run the unittests for the current environment’s Python version and Wagtail run:

make unittests

To check the code for style errors run:

make flaketest

To combine these tasks run:


To run the unittest against all supported versions of Python and Wagtail run:


The tox run will also create a coverage report combining the results of all runs. This report is located in htmlcov/index.html.

To run individual tests by name use the script and give the dotted path the the test module(s), class(es) or method(s) that you want to test e.g.:

./ tests.test_module.TestClass.test_method

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for wagtail-pg-search-backend, version 1.2.0
Filename, size File type Python version Upload date Hashes
Filename, size wagtail-pg-search-backend-1.2.0.tar.gz (12.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page