Reindexing

Updated at:

OpenSearch Industry Algorithm Edition creates an image for uploaded data and data that is synchronized from data sources. If you modify the schema of an application or upload full data to the application, you must perform reindexing.

Four types of operations currently trigger reindexing:

  • Manual reindexing: Typically used after changing an application schema or to import a full user dataset.

  • Scheduled reindexing: Typically used to import a full user dataset daily from data sources such as MaxCompute.

  • Offline changes: Changes to application schemas, indexes, or attribute structures trigger reindexing.

  • Clear data/Clear documents: Clearing or cleaning documents also triggers reindexing.

Scheduled reindexing

Create a scheduled reindexing task to automatically reindex once a day at a specified time.

  1. On the OpenSearch console Instance Management page, click Details for the application.

  2. Click Reindexing.

  3. Select the time at which to trigger the scheduled reindexing task. The minimum interval is one day, so the task runs once a day.

    In the Create Scheduled Task panel, select execution days using the weekday buttons (Monday through Sunday), enable Automatically Update Data, and click Create to complete the configuration.

Note:

  • An OpenSearch application supports at most two versions: an online application and an offline application. If both already exist, scheduled reindexing automatically deletes the offline version. For manual reindexing, you must delete the offline version.

  • After scheduled reindexing completes, the new version (offline application) automatically becomes the online version. The replaced version is automatically deleted after 8 to 16 hours.

Manual reindexing

Manually create and run a reindexing task.

  1. On the Instance Management page of the OpenSearch console, click Details for the application.

  2. Click Reindexing.

    This button is in the action area at the upper right of the instance details page.

  3. Select Reindex Only or Re-import Data and Reindex to trigger a manual reindexing task.

    • Reindex Only: Use this option after changing an application schema or after automatic data synchronization or upload completes.

    • Re-import Data and Reindex: Configure a data source first. This option is unavailable if no data source is configured.

Reindexing procedure and progress

The process is: data import -> data processing -> index building.

After data is imported from a data source, it is processed and sent to the build service for index building. Full-import build tasks run in rounds, each lasting about 30 minutes. Therefore, a full task may take time even with few documents. The console displays reindexing progress by stage.

Note:

  • If online and offline applications both exist, only the online application provides search services. It is the default version searched when you call the search operation using appname.

  • If both online and offline applications exist, offline changes, reindexing, clearing data, and cleaning documents are unavailable. Keep only one version: publish the version you want to keep online, and delete the unwanted offline version.

  • Deleted applications cannot be recovered.

  • For manual reindexing, if you select Reindex Only, only incremental data is synchronized; full data is not synchronized again. If you select Re-import Data and Reindex, both full and incremental data are synchronized.