Documentation
(C) IBM Corp. 1996, 1999

Text Extender: Administration and Programming

ENABLE TEXT TABLE

Creates a common index for use by any of the table's text columns that are later enabled. The table is then a common-index table. A table that does not get enabled in this way, where the text columns that are later enabled create their own individual indexes, is a multi-index table.

Authorization

You must have at least one of the following for the table:

ALTER privilege

SELECT privilege

UPDATE privilege.

Command syntax

>>-ENABLE TEXT TABLE--table-name-------------------------------->
 
>-----+----------------------------+---------------------------><
      '-| index-characteristics |--'
 
index-characteristics
 
|---+-----------------------------------------------------------------+->
    '-INDEXTYPE--+-PRECISE----+---+--------------------------------+--'
                 +-LINGUISTIC-+   '-INDEXOPTION--+-CASE_ENABLED-+--'
                 +-DUAL-------+                  '-NORMALIZED---'
                 '-NGRAM------'
 
>----+--------------------------------------------------------------------------------+->
     |                                                          .-,------------.      |
     |                                                          V              |      |
     '-INDEXPROPERTY--SECTIONS_ENABLED--+-DOCUMENTMODEL--+---(-----modelname---+---)--'
                                        '-DOCUMENTMODELS-'
 
>----+----------------------------------------+----------------->
     '-UPDATEFREQ--+-NONE------------------+--'
                   '-| update-frequency |--'
 
>-----+-------------------------------------------------------------------------------+>
      +-DIRECTORY--directory----------------------------------------------------------+
      |  .--------------------------------------------------------------------------. |
      |  |                                          .-,---------------------.       | |
      |  V                                          V                       |       | |
      '----DIRECTORY--directory--ON--+-NODE--+---(-----node--+-----------+--+---)---+-'
                                     '-NODES-'               '-TO--node--'
 
>---------------------------------------------------------------|
 
update-frequency
 
|---MIN--(--mindocs--)--D---(--+-*------------+---)---H--------->
                               |  .-,-------. |
                               |  V         | |
                               '----0...6---+-'
 
                                       .-,---------.
                                       V           |
>----(--+-*-------------+---)---M---(-----0...59---+---)--------|
        |  .-,--------. |
        |  V          | |
        '----0...23---+-'
 

Command parameters

table-name
The name of the text table to be enabled in the connected database. The name must include an explicit schema name (qualifier) unless the schema name is the same as your user ID.

INDEXTYPE
The type of index to be created. For more information, see Types of index.

PRECISE
Terms are indexed and searched for exactly as they occur in the text documents.

LINGUISTIC
Terms are processed linguistically before being indexed. Search terms are also processed linguistically before the search begins.

DUAL
Terms are indexed exactly as they occur in the text documents, and they are also indexed after being processed linguistically. When searching, you can decide for each term whether to search for the precise term or for the linguistically processed term.

NGRAM
Terms are indexed by parsing sets of characters rather than by using a dictionary. This dictionary type is mandatory if the documents you are indexing contain DBCS characters, although an Ngram index can also be used for SBCS documents.

If you do not specify the INDEXTYPE keyword, the text configuration is used.

INDEXOPTION
Options to be used when creating the index.

CASE_ENABLED
This option is available only for Ngram indexes. Normally, Ngram indexes do not allow a case-sensitive search. By specifying CASE_ENABLED, you ensure that documents are indexed such that a case-sensitive search is possible. For more information see Ngram index.

INDEXPROPERTY SECTIONS_ENABLED DOCUMENTMODEL(S) model-name
Properties of a selected index type.

SECTIONS_ENABLED specifies that the selected index type can contain information about the document structure.

DOCUMENTMODEL/DOCUMENTMODELS model-name specifies the model or models to be associated as default for the documents to be indexed. A model name must be specified if the index property SECTIONS_ENABLED is used. If a list of models is specified, the first model is used as the default model for the index. The default model is used during indexing if the document has no reference to a model, or if no model is specified during search.

The characters that can be used for the model name are a-z, A-Z, and 0-9.

The specified model name must correspond to a model definition in the model definition file desmodel.ini.

To change the model or models associated with an index,

  1. Use DISABLE TEXT TABLE to disable the index

  2. Use ENABLE TEXT TABLE to reindex the documents, specifying different document model names.

UPDATEFREQ update-frequency
The index update frequency in terms of when the update is to be made, and how many text documents must be queued in the log table. If there are not enough text documents in the log table at the day and time given, the index is not updated.

The syntax is described in Setting the frequency of index updates.

If you do not specify UPDATEFREQ, the default frequency specified in the text configuration settings is used.

NONE
No further index updates are made. This is intended for a text column in which there will be no further changes.
Tip

If you have many tables, consider avoiding the use of the default values. By making individual update frequency settings for tables you can avoid indexing all the tables simultaneously and causing an unnecessarily prolonged load on your system resources.

DIRECTORY directory
The directory path in which the text index is to be stored. The specified path is concatenated with ""txinsnnn" where nnn is the node number.

This is an existing directory on the system where the Text Extender server is running.

If you do not specify the DIRECTORY keyword, the value of the DIRECTORY setting in the text configuration settings is used.

If you are using partitioned databases, you can specify one common index path name for all nodes, or for a range of nodes. or different index directory paths for each node.

ON NODE node [TO node]
The number of the node or the range of nodes to which a directory path name is being assigned.

Usage notes

A new text index is created that is associated with all the text columns in this table. You do this when you want to have one common index for all the text columns of a table, rather than a separate index for each text column.

When you have enabled a table, you must then run ENABLE TEXT COLUMN for each of the text columns in which you want to search.

A log table is created in the database. The table is used to record changes, that is , inserts, updates, and deletions, in the text columns that are later enabled.

When a text column is enabled, triggers are created that monitor changes to the text and automatically keep a record in the log table of which documents need to be indexed.

Text Extender indexes the text documents listed in the log table periodically as specified by the UPDATEFREQ keyword.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]