5.2. Full text search

The full text search module offers the possibility of searching anything in the database like the user is used in web searchers. As the module uses the full text searching capabilities of PostgreSQL, the administrator can tune the system to provide great results, by setting different priorities to different fields or by using dictionaries and stemmers. For example, one can make the search for the word 'using', return any document that contains the words 'use', 'using' and 'used'.

Full text search works very well with the Smart Attach module, meaning that you can index meta information automatically extracted from attached documents.

5.2.1. Installation

Before you can use this module you'll need to satisfy two dependencies:

Note

In both cases it's possible to add support to a single database or to all newly created databases by adding TSearch2 or Python support to database template1, which is used to create new databases in PostgreSQL (unless another template is specified).

This module also uses Psycopg2 in the trigger and thus such a package needs to be installed in the server where PostgreSQL resides. Psycopg2 is used to quote field values and avoid SQL injection.

5.2.2. Configuration

Once you've installed the dependencies and the module via Administration - Module Administration - Modules, you need to configure which fields you want to be indexed. The module will add a new section in Administration - Configuration - Full Text Search.