Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - SQL Usage » Queries and data modification » Full text search » What is full text search?

 

Creating a text index

Create text indexes on columns of any type. Columns that are not of type VARCHAR or NVARCHAR are converted to strings during indexing.

Prérequis

To create a text index on a table, you must be the owner of the table or have one of the following privileges:

  • CREATE ANY INDEX system privilege
  • CREATE ANY OBJECT system privilege
  • REFERENCES privilege on the table and either the COMMENT ANY OBJECT system privilege, the ALTER ANY INDEX system privilege, or the ALTER ANY OBJECT system privilege

To create a text index on a materialized view, you must be the owner of the materialized view or have one of the following privileges:

  • CREATE ANY INDEX system privilege
  • CREATE ANY OBJECT system privilege

You cannot create a text index when there are cursors opened with the WITH HOLD clause that use either statement or transaction snapshots.

You cannot create a text index on a regular view or a temporary table. You cannot create a text index on a materialized view that is disabled.

Contexte et remarques

Text indexes consume disk space and need to be refreshed. Create them only on the columns that are required to support your queries.

Creating more than one text index referencing a column can return unexpected results.

 Task
  1. In Sybase Central, use the SQL Anywhere 16 plug-in to connect to the database.

  2. Click the Text Indexes tab.

  3. Click File » New » Text Index.

  4. Follow the instructions in the Create Index Wizard.

    The new text index appears on the Text Indexes tab. It also appears in the Text Indexes folder.

Résultat

The text index is created. If you created an immediate refresh text index, it is automatically populated with data. For other refresh types, you must manually refresh the text index.

 See also