All Products
Search
Document Center

Manual and scheduled reindexing

Last Updated: Sep 09, 2021

OpenSearch creates a data image for uploaded data and data synchronized from data sources. If you modify the schema of an application or upload full data to the application, you must rebuild the indexes of the application. The following four scenarios trigger reindexing:

  • Manual reindexing: If you modify the schema of an application or upload full data to the application, you can manually trigger reindexing.

  • Scheduled reindexing: Full data is synchronized from a MaxCompute data source to an application every day. You can configure scheduled reindexing for the application. If you configure an ApsaraDB RDS for MySQL or a PolarDB for MySQL data source for an application, data is automatically synchronized to the application by default. Therefore, you do not need to configure a scheduled reindexing task for this application.

  • Offline changes: If you modify the schema of an application, modify index or attribute fields, or change the data source of the application, OpenSearch triggers reindexing. For more information, see Perform offline changes.

  • Clear data or clear documents: If you clear data or documents, OpenSearch triggers reindexing. For more information, see Clear data and Clear documents.

Scheduled reindexing

After you create a scheduled reindexing task, OpenSearch performs reindexing once at a specified time every day.

1.Log on to the OpenSearch console. On the Applications page, find the application for which you want to create a scheduled reindexing task, and click Details in the Actions column.

1

2.Click Reindex.

2

3.Specify a time when the scheduled reindexing task is triggered. The minimum interval at which the scheduled reindexing task is triggered is 24 hours. This means that the scheduled reindexing task can be triggered once a day.

3

Note:

  • An application can have up to two versions, which are the online application and offline application. If an application has two versions, OpenSearch will stop running the scheduled reindexing task.

  • When the scheduled reindexing task is completed, the created offline application is published to replace the online application. OpenSearch automatically deletes the replaced application 8 hours after it is replaced.

Manual reindexing

To manually trigger reindexing, perform the following steps:

1.Log on to the OpenSearch console. On the Applications page, find the application for which you want to manually trigger reindexing, and click Details in the Actions column.

4

2.Click Reindex.

5

3.Select Rebuild Index Only or Re-import Data and Rebuild Index. Then, click OK.

6

Reindexing procedure and progress

Reindexing is performed in the following procedure: 1. Import data. 2. Process the data. 3. Build indexes.

After data is synchronized from a data source, OpenSearch processes the data and delivers the data to the build service for index building. If full data is synchronized, OpenSearch performs reindexing on a regular basis. The time that is required for each reindexing is 30 minutes. Therefore, the reindexing of full data takes some time even though only a small number of documents are involved. The OpenSearch console displays the progress of reindexing based on the status of each step.

Notes:

After you modify an advanced or a standard application offline, OpenSearch generates an offline application. In this case, the online application and the offline application exist at the same time.

  • If the online application and the offline application exist at the same time, only the online application provides search services. When you use an application to search for data by specifying the application name in an API operation, the online application is used.

  • After you delete an application, you cannot recover it.