Skip to content
Dave Hall edited this page Sep 22, 2017 · 6 revisions

Database support

django-watson uses the built-in search capabilities of your database to provide fast high-quality full text search results. Because of this, there are a few database-specific notes you should be aware of.

The database backend is configured using the WATSON_BACKEND setting. It defaults to "watson.backends.AdaptiveSearchBackend", which auto-detects the correct backend for your configured database. You can skip the auto-detection process by setting the backend name to the correct backend for your database.

PostgreSQL

django-watson takes advantage of PostgreSQL's built-in full text indexes to provide excellent search capabilities.

Speed: Excellent

Ranking: Supported

Prefix matching: Supported

Backend: "watson.backends.PostgresSearchBackend"

MySQL

django-watson uses MySQL's full text indexes on a MyISAM table to provide good search capabilities.

Speed: Good

Ranking: Supported

Prefix matching: Supported

Backend: "watson.backends.MySQLSearchBackend"

SQLite3, and the rest

django-watson works with other database backends, but uses simple regular expressions to perform the searches. As such, it's only really good for development on these backends, and won't hold up to serious production use:

Speed: Poor

Ranking: Not supported

Prefix matching: Not supported

Backend: "watson.backends.RegexSearchBackend"