Quick start
Prerequisites
-
You have registered an Alibaba Cloud account and completed real-name verification.
-
After you create an Alibaba Cloud account and log on to the console, you are prompted to create an AccessKey pair before you can continue.
-
Creating and using applications depends on the AccessKey parameters. The AccessKey parameters of the Alibaba Cloud account cannot be empty.
-
After you create the AccessKey parameters for the Alibaba Cloud account, you can also create AccessKey pairs for RAM users and access resources as RAM users. To grant the required access permissions to RAM users, see RAM authorization.
-
You must have a VPC environment. For more information, see What is VPC.
Note:
If you want to use a RAM user to manage OpenSearch Retrieval Engine Edition instances, use your Alibaba Cloud account to grant the AliyunSearchEngineFullAccess and AliyunSearchEngineReadOnlyAccess permissions to the RAM user.
Purchase an instance
For information about how to purchase an instance, see Purchase an OpenSearch Retrieval Engine Edition instance
Configure the cluster
Note:
On the details page of a newly purchased instance, the instance status is "Pending Configuration", and an empty cluster is automatically deployed whose number and specifications of Query Result Searcher (QRS) nodes and data nodes match those you purchased.
1. Select the instance that you want to configure and click Configure.
2. Enter the table name, select the number of shards and the number of data update resources as required, and then click Next.
Name: The name can contain letters, digits, and underscores (_), and can be up to 25 characters in length.
Number of Shards: Enter a positive integer that does not exceed 256. Shards are used to improve full index building speed and single-query performance.
Number of Data Update Resources: The number of resources for real-time data updates. Adjusting the resources can increase the concurrency for consuming real-time data and therefore improve TPS.
3. Configure the data source. Supported data sources are "MaxCompute + API data source", "OSS + API data source", "API data source", and Data Lake Formation (DLF). This topic uses a MaxCompute data source as an example. After you configure the parameters, you can choose whether to enable "Automatic Index Rebuilding" as needed. After the verification succeeds, click Next.
To configure a MaxCompute data source, specify the following parameters: AccessKey and AccessKey Secret, Project (must start with a letter, can contain only letters, digits, and underscores, and must be 3 to 28 characters in length), Table (must start with a letter, can contain only letters, digits, and underscores, and must be 1 to 128 characters in length), and Partition (separate multi-level partitions with commas). After you complete the settings, click Verify to pass the data source verification. Only then can you click Next.
4. Select the primary key, attribute fields, and fields to display in search results, specify whether to compress data, and select the analysis method for the corresponding fields.
Attribute and field content compression:
-
You can choose whether to compress attribute fields. By default, attribute fields are not compressed. Selecting file_compressor enables compression.
-
You can choose whether to compress field content. By default, field content is not compressed. By default, uniq is selected for multi-value fields and STRING fields, and equal is selected for single-value numeric fields.
-
If you enable attribute compression, we recommend that you go to Cluster Management > Node Status > Table Loading Policy to edit the index loading method to reduce the impact on performance.
-
Fields for which you configure an analysis method must be of the TEXT type.
-
You can copy fields. The content of a new copied field (DUP field) remains consistent with that of the original field. If inconsistent content is pushed, it is overwritten by the content of the original field. If you want the field content to differ, manually delete the copy from setting in the advanced configuration of the DUP field.
-
If a field is missing from the data or is empty, the system automatically fills in a default value: 0 for numeric types and an empty string for the STRING type. Custom default values are supported.
5. Configure indexes for the fields that need to be retrieved by index. After the configuration is complete, click Next.
5. Configure indexes: On the index settings page, set the Index Name, Index Type (such as TEXT or STRING), Included Fields, and Data Compression method. You can click View/Modify to adjust advanced settings, or click + to add an index row. When you are finished, click Next.
6. Click Confirm Creation and wait for the version build to complete.
After you confirm that the information is correct, click Confirm Creation. The system automatically builds indexes based on the selected concurrent resources. After the build is complete, the indexes are automatically enabled in the current instance.
View index rebuilding progress
In the left-side navigation pane, click Change History and select Last 3 Days to view the detailed build progress.
Query testing
You can perform simple search tests in Extended Features > Query Test. OpenSearch Retrieval Engine Edition supports three query methods: HA query, SQL query, and RESTful API query.
After you select HA query as the query method, enter a query statement in the query box (for example, id:'1'; for the format, refer to the hint daogou:part_ids=0|2), and set cluster (for example, general) and config (for example, start:0,hit:10,format:json). After you submit the query, the request URL, number of matches, time consumed, and returned values of each field are displayed in the lower part of the page.
-
[Documentation]Query syntax
-
[Documentation]RESTful API for the OpenSearch Retrieval Engine Edition
Usage notes
Important
-
Only the pay-as-you-go billing method is currently supported.
-
The username and password that you set when you purchase an instance can be modified on the instance details page.
-
The cluster name is assigned by the system when you purchase an instance and currently cannot be modified.
-
Index rebuilding is billed based on the amount of resources consumed each time. For more information, see Billing of OpenSearch Retrieval Engine Edition on the international site.