TurboSQL Guide

CREATE FULLTEXTINDEX Statement

Previous  Top  Next

Creates a new full-text index for an existing table.

Syntax

CREATE FULLTEXTINDEX index_reference ON table_reference (column_reference [, column_reference ...]) DICTIONARY table_reference [CREATE] [UPDATE]

Description

A full-text index enables searching with full-text search-conditions like the CONTAINS predicate. The column references are a list of table columns of all types with the exception of blob columns including memos and wide memos. Full-text indexes need an additional database table, which contains the list of indexed words, the dictionary.

The dictionary table can be created by this statement or explicitly. If CREATE is not indicated, the statement expects an existing dictionary table with the following characteristics:

First column is a VARCHAR or VARWCHAR of arbitrary length. This column determines the possible search-words. If words are longer than this column allows, they are cut.
Second column is of type BYTE. It contains the global relevance of this word.
Other columns may or may not follow according to the needs of the application.
There must be a column of type AUTOINC to identify the words. The indication of this AUTOINC column must be the first column of the table.

If the CREATE clause is included, the statement creates a new dictionary table with a first column as VARCHAR(20).

If UPDATE is included, words that are not found in the dictionary table are added to it. If UPDATE is not included, only words from the dictionary table are indexed and can be found in searches.

Note

Full-text search technology for tables up to level three is different from the one for tables starting from level four. Only full-text indexes for tables of level four and above support automatic maintenance and relevance calculation.