After column mappings are configured between a wide table and an index table, data that is written to the wide table is automatically synchronized to the index table in real time. You must build indexes for full data in the wide table to synchronize the full data in the wide table to the index table. This topic describes how to build indexes to synchronize full data.

Prerequisites

  • Java Development Kit (JDK) 1.8 or later is installed.
  • The search index is accessed by calling API operations of an open source client, and the configuration file that contains column mappings between the wide table and index table is configured. For more information, see Use an open source client to use SearchIndex.
  • The engine version of Lindorm Tunnel Service (LTS) of the Lindorm instance is 3.6.10 or later.

View a full data synchronization task

  1. Enter the Linux shell. For more information, see Use HBaseue Shell to connect to and use LindormTable.
  2. Run the following command to build an index for full data in the testTable wide table. The command is run in asynchronous mode.
    build_external_index 'testTable'
  3. View the progress of the full data synchronization task. An index for full data in the wide table is built by LTS. You can view the progress of the full data synchronization task on the LTS web UI.
    1. Log on to the LTS web UI. To log on to the LTS web UI, click the instance ID in the Lindorm console. In the left-side navigation pane, choose Wide Table Engine > SearchIndex. In the LTS WebUI Access section, click ClusterManager.
    2. In the left-side navigation pane, choose Lindorm Search > Full Data replication to Solr.
      View the progress of the task
  4. Optional:Cancel building the index for full data of the wide table. The full data synchronization task is run in asynchronous mode when the index is being built for full data of the wide table. To stop the full data synchronization task, run the following command:
    cancel_build_external_index 'testTable'

Synchronize full data in a specified time range

Note The engine version of Lindorm Tunnel Service (LTS) of the Lindorm instance is 3.6.10 or later.
  1. Log on to the LTS web UI. To log on to the LTS web UI, click the instance ID in the Lindorm console. In the left-side navigation pane, choose Wide Table Engine > SearchIndex. In the LTS WebUI Access section, click ClusterManager.
  2. In the upper-right corner of the page, click Configuration.
  3. Change conf.jsp in the address bar of the browser to cm.jsp and press Enter. The Modify Configuration Information page appears.
    Create Collection dialog box
  4. Specify Configuration Item and Value.
    • In the Configuration Item field, enter search.index.build.timerange.
    • In the Value field, specify the index table and time range in the following format: Name of the index table:Time column,Time unit,Start time value,End time value. For example, you can set the value to myIndex:create_time,ms,1654486200000,1654488000000. This specifies that the data of the create_time column in the myIndex index table within the time range [1654486200000,1654488000000] is filtered, and an index is recreated for the data. The following table describes the configuration items:
      Configuration itemDescriptionExample
      Name of the index tableThe name of the index table. myIndex
      Time columnThe time column that you want to specify. If no time column is available, you can use the default column update_version_l. Unit: ms. create_time
      Time unitThe unit of time values in the time column. Default value: ms. Valid values: s and ms. ms
      Start time valueThe value of the start time when you want to recreate the index. Unit: ms. 1654486200000. This value specifies that the point in time is 11:30 on June 6, 2022.
      End time valueThe value of the end time when you want to recreate the index. Unit: ms. 1654488000000. This value specifies that the point in time is 12:00 on June 6, 2022.
      Note If you want to specify multiple values to recreate indexes for full data in the wide table based on multiple index tables, separate the values with semicolons (;).
  5. Click Modify.
  6. Run the following command to create an index for the full data of the testTable wide table:
    build_external_index 'testTable'
  7. After the index is created for the full data of the wide table, set Configuration Item to search.index.build.timerange, leave the Value field empty, and then click Modify.