Modify a table

Updated at: 2024-11-04 08:16

This topic describes how to modify data shards, data sources, field configurations, and index schemas of a table.

Take data shards as an example, the following section shows how to modify a table and make the changes online.

  1. Log on to the OpenSearch console. Go to the details page of the instance that you want to manage and click Table Management in the left-side pane. Find the table that you want to modify and click Edit in the Actions column.

image.png

  1. In the Basic Table Information step, modify the number of data shards:

image.png

Note:

  • Set the number of shards to a positive integer up to 256 to enhance full build speed and single query performance. For certain existing instances, ensure consistency in the number of shards across index tables, or at least one index table has a single shard while the others have an equal number of shards.

  • If data node capacity is maxed out, scale-out shard operations are not possible. Before you increase the number of data shards for a table, make sure that the number of Searcher workers is greater than the number of data shards. For more information about how to increase the number of Searcher workers, see Change the configurations of an instance.

  1. Confirm the data source details and click Next:

    Note

    For API data sources, simply click Next. For MaxCompute, OSS, and DLF data sources, the default setting is to leave the full data source information unchanged. If modifications are necessary, select the option to change, enter the new configuration details, then click Data Source Verification followed by Next.

  1. Modify the field configurations such as the field type and the advanced configurations based on your business requirements. Then, click Next.

image

  1. Modify the configurations of the index schema. Enable document expiration settings and adjust vector index configurations as needed. Then, click Next:

    索引结构cn.png

  1. Finalize your edits, ensure they align with the full data source, and click confirm:

    • MaxCompute data source: Select Import Full Data for reindexing.

    • OSS data source: Select Import Full Data for reindexing.

    • API push data source: Select Empty Data for reindexing.

    • DLF data source: Select Import Full Data for reindexing.

      Important
      • When altering a MaxCompute data source table, the system retrieves partition data and incremental data based on the specified timestamp for reindexing.

      • Using the empty data reindexing method will erase previously pushed data and begin capturing real-time data from the specified timestamp. Exercise caution with this method.

      • The Timestamp setting determines the period for which the system will backtrack API incremental data during a full index reindexing, supporting up to 3 days of data retrieval.

  2. Monitor the progress of the changes on the Change History > Data Source Changes page:

image.png

Note

Upon completion of the table modifications and reindexing, two finite-state machines (FSMs) are created to implement configuration updates and to manually initiate full indexing. The changes will take effect once the FSM processes in the data source change workflow are finalized.

    Feedback
    phone Contact Us

    Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

    alicare alicarealicarealicare