Full-Text Retrieval

Textual search operators have been used in databases for years. GaussDB(DWS) has ~, ~*, LIKE, and ILIKE operators for textual data types, but they lack many essential properties required by modern information systems. This problem can be solved by using indexes and dictionaries.

Text search lacks the following essential properties required by information systems:
Full text indexing allows documents to be preprocessed and an index is saved for later rapid searching. Preprocessing includes:

Dictionaries allow fine-grained control over how tokens are normalized. With appropriate dictionaries, you can define stop words that should not be indexed.

A data type tsvector is provided for storing preprocessed documents, along with a type tsquery for storing query conditions. For details, see Text Search Types. For details about the functions and operators provided for the tsvector data type, see Text Search Functions and Operators. The matching operator @@ is the most important. For details, see Basic Text Matching.