Small. Fast. Reliable.
Choose any three.
This page documents the SQL-level interface to the full-text-search module. The version documented is fts3, though fts2 and fts1 usage is similar.

Creating and Destroying Tables

If no tokenizer is requested, then the simple tokenizer is used. Additional user-defined tokenizers may be built into a particular SQLite library, SIMPLE and PORTER are the only tokenizers provided by default. If no column names are requested, then the single column content is used. Thus, the following statements all create the same table:

  CREATE VIRTUAL TABLE t USING fts3;
  CREATE VIRTUAL TABLE t USING fts3();
  CREATE VIRTUAL TABLE t USING fts3(content);
  CREATE VIRTUAL TABLE t USING fts3(TOKENIZE simple);
  CREATE VIRTUAL TABLE t USING fts3(content, TOKENIZE simple);

The column names 'docid' and 'tokenize' are reserved and should not be used. Multiple column names can be provided:

  CREATE VIRTUAL TABLE t USING fts3(name, address);

Only the first word of a column definition is considered in creating the table - all extraneous text is ignored. So the following two statements are identical:

  CREATE VIRTUAL TABLE t USING fts3(name);
  CREATE VIRTUAL TABLE t USING fts3(name NOT NULL UNIQUE);

In other words, any additional information, including constraints and type information, is ignored.

Destroying an fts table uses the standard SQLite DROP TABLE syntax. For example: