Configure an online application
In the OpenSearch console, choose Search Algorithm Center > Retrieval Configuration in the left-side navigation pane. On the Basic Configuration page, select an application and Online Application from the drop-down lists. Then, you can view the analysis configurations that are applied to the selected application. To modify the schema of the online application, click Modify Offline Application in the upper-right corner.
Configure an offline application
In the OpenSearch console, choose Search Algorithm Center > Retrieval Configuration in the left-side navigation pane. On the Basic Configuration page, select an application and Offline Application from the drop-down lists. After you select Offline Application, the Modify Offline Application button changes to Configure.
Configure the name, analyzer, and fields for each index. For more information about analyzer types, see Application schema and index schema.
You can configure analysis methods only on the offline version instead of the online version of an application.
An application can have only two versions: the online application and the offline application. If you want to modify the configurations of an application that has the offline version, you may encounter the following situations:
If you modify configurations such as analyzers and the application schema before reindexing, OpenSearch deletes the previous offline changes.
If you perform changes that can trigger reindexing after reindexing, such as the changes to the application schema and data sources, OpenSearch deletes the existing offline version and rebuilds a new one.
Configurations of the application schema are time-consuming. OpenSearch allows you to separately save configurations of the application schema and rebuild indexes. This way, your configurations of the application schema can be retained even if the reindexing fails.
Note: The following example shows how to perform basic configurations including customizing analyzers and modifying an online application. Custom analyzers are required only when existing dictionaries for analysis have invalid entries. In other cases, you can use the built-in analyzers.
1.In the OpenSearch console, choose Search Algorithm Center > Retrieval Configuration in the left-side navigation pane. On the page that appears, click Analyzer Management in the left-side pane. On the Analyzer Management page, create a custom analyzer.
2.Add entries to the custom analyzer
Note: The terms generated after analysis are separated by spaces. For example, the analyzer can break "beefjerky" into "beef jerky".
3.Go to the Basic Configuration page. On this page, modify the configurations of the online application to add the custom analyzer.
Configure the index schema.
Select the custom analyzer that you create from the drop-down list in the Analysis Method column.
4.Specify whether to synchronize incremental data to new offline version of the application and whether to publish the new offline version to the online environment.
After you modify the index schema, click Next. The New Application dialog box appears. By default, Yes is selected for both parameters in the dialog box. If you select No for each parameter, the parameter settings take effect in the following way:
When the system is building a new offline version, incremental data that are pushed in real time from data sources or by calling an API operation is not synchronized to the new offline version.
If a new offline version is built after the reindexing on full data that is triggered by offline changes, the new offline version is not automatically published to the online environment. The new offline version can be retained and cannot be automatically deleted after 8 hours.
5.Save the configurations. Then, you can view the offline application. The Configure button changes to Rebuilding Index.
Note: If the online application and the offline application coexist and the Configure button changes to Rebuilding Index, the Modify Offline Application button is unavailable.
6.Publish the offline application to the online environment after the indexes are rebuilt on the data of the offline application and the data of the offline application can be searched.
An application can have only two versions: the online application and the offline application. Two versions may coexist. In this case, if you modify the application schema, the configurations of existing offline application are overwritten.
If you change the analyzers of the application, the analyzers take effect only after reindexing.