This topic describes how to quickly create an Alibaba Cloud Elasticsearch cluster, access the cluster, call the Elasticsearch RESTfult API, and search for business data.

Background information

Make sure that you have understood the following information:

Scenario

A finance service enterprise uses an online platform to manage its wealth management products. The enterprise uses conventional databases to provide search functionality for customers. The wealth management products provided by the enterprise offer satisfactory returns, and the customer base of the enterprise grows rapidly. The expansion of its business systems and increase of customer information cause the inherent issues of conventional databases to become noticeable. These issues include slow search responses, low accuracy, and the low performance of data service devices. To resolve these issues and improve customer satisfaction, the enterprise purchases the Alibaba Cloud Elasticsearch service. This topic uses this scenario to describe how to use Elasticsearch to create a cluster and search for data.

For example, the wealth management products of the enterprise are as follows:
{
"products":[
{"productName":"Daily Wealth Management for Comprehensive Health","annual_rate":"3.2200%","describe":"180-day wealth management product. Minimum investment of CNY 20,000. Low-risk investment. Select whether to receive push messages for returns"}
{"productName":"Western Tongbao","annual_rate":"3.1100%","describe":"90-day wealth management product. Minimum investment of CNY 10,000. Daily push messages when returns are credited to your account."}
{"productName":"Anxiang Livestock Industry","annual_rate":"3.3500%","describe":"270-day wealth management product. Minimum investment of CNY 40,000. Daily push messages when returns are immediately credited to your account."}
{"productName":"Monthly 5G Device Purchase Profit","annual_rate":"3.1200%","describe":"90-day wealth management product. Minimum investment of CNY 12,000. Daily push messages when returns are credited to your account."}
{"productName":"New Energy Power Wealth Management","annual rate":"3.0100%","describe":"30-day wealth management product. Minimum investment of CNY 8,000. Daily push messages for returns."}
{"productName":"Microcredit Profit","annual_rate":"2.7500%","describe":"3-day popular wealth management product. No service fees. Minimum investment of CNY 500. Push messages for returns."}
]
}

Procedure

Before you perform the following operations, make sure that you have read the instructions provided in Precautions. The procedure is as follows:

  1. Make preparations.

    Create a Virtual Private Cloud (VPC) and a VSwitch, and evaluate the specifications and storage capacity for your Elasticsearch cluster. For more information, see Create a VPC and a VSwitch and Evaluate specifications and storage capacity.

  2. Create an Elasticsearch cluster.

    For more information about the parameters that are required for creating an Elasticsearch cluster, see Parameters on the buy page. In this topic, Alibaba Cloud Elasticsearch V6.7 is used as an example.

  3. (Optional) Configure the cluster.

    You can enable auto indexing, and configure plug-ins, security settings, and monitoring and alerting settings.

  4. Access the cluster.

    You can use the Kibana console, a curl command, or a client to access the cluster.

  5. Query business data.

    Alibaba Cloud Elasticsearch V6.7 allows you to use the Kibana console to perform the following operations: creating an index, creating a document and inserting data into the document, searching for data, and deleting an index.

  6. (Optional) Release the cluster.

    You can release an Elasticsearch cluster that you no longer use to avoid resource waste. After the cluster is released, you are no longer charged for the cluster. In addition, the data in the cluster is deleted and can no longer be recovered.