---
title: Text Analysis in Database Queries
slug: bWp8rLVs9pLOjqTMdmDFq
description: Utilize Ocient text analysis functions for effective querying and manipulation of textual data, essential for data insights.
docTags: 
createdAt: Thu Jan 05 2023 22:04:50 GMT+0000 (Coordinated Universal Time)
updatedAt: Wed Apr 08 2026 14:59:28 GMT+0000 (Coordinated Universal Time)
---

The Ocient Data Intelligence Platform™ enables search and analysis of textual data. You can run queries efficiently using indexes in the Ocient Data Intelligence Platform to perform text analysis. The database supports different types of indexes. The N-gram index is a type of secondary index that enables text analysis.

**Cluster Key Indexes&#x20;**

Define cluster key (CK) indexes when you create the table.

| **Index Type**                   | **Number of Columns**     | **Column Types**                                        | **Filters**          |
| -------------------------------- | ------------------------- | ------------------------------------------------------- | -------------------- |
| Primary CK index (always exists) | Multiple                  | Fixed-length or GDC columns, fixed-length tuple columns | Equality-like, range |
| Additional CK indexes            | Subset of CK in any order |                                                         |                      |

**Secondary Indexes&#x20;**

You can create or drop secondary indexes at any time.

| **Index Type**   | **Number of  Columns** | **Column Types**                                      | **Filters**          |
| ---------------- | ---------------------- | ----------------------------------------------------- | -------------------- |
| Inverted indexes | Single                 | Fixed-length or GDC column, array, or tuple component | Equality-like, range |
| Hash indexes     |                        | Variable-length column, array, or tuple component     | Equality-like        |
| N-gram indexes   |                        | VARCHAR column, array, or tuple component             | LIKE, equality-like  |

N-gram indexes support text analysis by providing an efficient search of textual data. This type of index works by tokenizing the pattern in the string, and then pruning and transforming the tokens. You can create N-gram indexes at any time. For details about creating an N-gram index, see [CREATE INDEX](<././SQL Reference/Data Definition Language _DDL_ Statement Reference/Indexes.md>).

There are other ways to perform text analysis. For details, see the syntax for [LIKE](<././Query Ocient/General SQL Syntax.md>) and [SIMILAR TO](<././Query Ocient/General SQL Syntax.md>).

## Related Links

[General SQL Syntax](<././Query Ocient/General SQL Syntax.md>)

[Secondary Indexes](<././Database Administration/Schema Design/Secondary Indexes.md>)

