Skip to navigation

Text Analysis in Database Queries

View as Markdown

The Ocient Hyperscale Data Warehouse™ enables search and analysis of textual data. You can run queries efficiently using indexes in the Ocient Hyperscale Data Warehouse 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

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

Index TypeNumber of ColumnsColumn TypesFilters
Primary CK index (always exists)MultipleFixed-length or GDC columns, fixed-length tuple columnsEquality-like, range
Additional CK indexesSubset of CK in any order

Secondary Indexes

You can create or drop secondary indexes at any time.

Index TypeNumber of ColumnsColumn TypesFilters
Inverted indexesSingleFixed-length or GDC column, array, or tuple componentEquality-like, range
Hash indexesVariable-length column, array, or tuple componentEquality-like
N-gram indexesVARCHAR column, array, or tuple componentLIKE, 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.

There are other ways to perform text analysis. For details, see the syntax for LIKE and SIMILAR TO.

General SQL Syntax

Secondary Indexes