Search index uses inverted indexes and column-based storage to solve complex query problems in big data analytics. This topic describes how to create a search index in the console and use the index to query data.

Note For more information, see Overview of search index.

Create a search index

The procedure is as follows:

  1. Log on to the Table Store console.
  2. Find an existing data table and click Manage in the Actions column corresponding to the table.
  3. In the upper-right corner of the Manage Index page, click Create Index.
  4. On the Create Index page, perform the following steps.
    1. Enter an index name in the Index Name field.
    2. Click Add Index Field.
    3. Enter Field Name and select Field Type. Specify Array, Index, Sort, and Additional Storage as needed.
      Note
      • Field Name and Field Type must match those in primary tables. For the relationship between field types in primary tables and those in search index tables, see Fields.
      • You can select Additional Storage to improve query performance.
    4. Click Add Index Field. Repeat the preceding steps to add multiple fields for the index. Click OK. The search index is created.
Note After you create a search index, click Index Information in the Actions column corresponding to the index to view Index Billing Information and Index Field information.

Query data

The following steps describe how to use the created index to query data:

  1. After you create a search index, find the index and click Data Query in the Actions column corresponding to the index.\
  2. On the Data Query page, perform the following steps.
    1. Select Index Name and specify Columns Returned as needed. To return all fields of a table, turn on All Columns.
      Note By default, the primary key columns of the primary table are returned.
    2. To add an index field, select the index and then click Add AND field. Configure the query to be added. Repeat this step to add multiple query types.
    3. To sort the returned results based on the index fields, turn on Sort. Configure the sorting parameters as needed.
    4. Click OK.
  3. In the lower part of the Manage Index page, view the query results.

SDKs

You can use the following SDKs to use the search index feature.