Rate This Document
Findability
Accuracy
Completeness
Readability

Introduction

APIs that use global indexes are included in the com.huawei.boostkit.hindex.GlobalIndexAdmin class. Table 1 describes the APIs.

Table 1 APIs of global indexes

Operation

API

Description

Creating an Index

addIndices()

Creates an index in withoutData mode. Calling this API will add the specified index to a table but skips index data generation. You can call this API when you want to add an index to a table with a large amount of data (more than 20 GB) and then use the GlobalTableIndexer tool to fill in the index data.

addIndicesWithData()

Creates an index in withData mode. Calling this API will add a specified index to the table and fill in the corresponding index data based on the existing user data. Do not call this API if a data table contains a large amount of data (more than 20 GB).

Deleting an index

dropIndices()

After an index is deleted, the index metadata and index table are also deleted. A deleted index cannot be used for a Scan or Filter operation.

Changing the index status

alterGlobalIndicesUnusable()

Disables the indexes specified by the user so that they can no longer be used for a Scan or Filter operation.

alterGlobalIndicesActive()

Enables the indexes specified by the user so that they can be used for a Scan or Filter operation.

alterGlobalIndicesInactive()

Disables a specified index so that is cannot be used for a Scan or Filter operation. The index table will not update data. This API is used to rebuild indexes.

Viewing a created index

listIndices()

Lists all indexes in a specified data table.