bsearch_label is a frontend data labeling plug-in. It supports visualized data labeling. This way, you do not need to write complex domain-specific language (DSL) statements. This topic describes how to use the bsearch_label plug-in to label data.

Background information

In most cases, when you analyze data, you may want to use query conditions to filter the data in addition to viewing the data and use tags to classify fields. This procedure is known as data labeling. After you add tags to data, you can use the tags to aggregate and classify the data, perform statistical analysis, and filter data by tag. The labeled data can be used in subsequent procedures.

Prerequisites

Make sure that the following conditions are met:
  • An Alibaba Cloud Elasticsearch V6.3 or V6.7 cluster is created.
    For more information, see Create an Alibaba Cloud Elasticsearch cluster. In this example, an Elasticsearch V6.3 cluster is used.
    Notice When you create an Elasticsearch V6.3 cluster, you must select the specifications of 2 vCPUs and 4 GiB of memory or higher for the Kibana node. If you select other specifications for the Kibana node, when you install the bsearch_label plug-in on the Elasticsearch cluster, the system displays a message indicating that you must upgrade the specifications of the Kibana node. If you want to install the bsearch_label plug-in on an existing Elasticsearch V6.3 or V6.7 cluster and the specifications of the Kibana node in the cluster are lower than 2 vCPUs and 4 GiB of memory, you can upgrade the specifications of the Kibana node by using the configuration upgrade feature. For more information, see Upgrade the configuration of a cluster.
  • The bsearch_label plug-in is installed.
    For more information, see Install a Kibana plug-in.
    Notice You can use the data labeling feature only after the bsearch_label plug-in is installed.
  • An index is created, and data is added to the index.

    For more information, see Getting started.

  • The language of the Kibana console is English. The default language is English. If the language is not English, change the language to English.

    For more information, see Configure the language of the Kibana console.

Procedure

  1. Log on to the Kibana console of your Elasticsearch cluster and go to the homepage of the Kibana console as prompted.
    For more information about how to log on to the Kibana console, see Log on to the Kibana console.
    Note In this topic, an Elasticsearch V6.3 cluster is used. Operations on clusters of other versions may differ. The actual operations required in the console prevail.
  2. In the left-side navigation pane, click Management and follow these steps to create an index pattern:
    Notice If you have created an index pattern, skip this step.
    1. In the Kibana section of the Management page, click Index Patterns.
    2. In the Create index pattern section, enter an index pattern name (the name of the index that you want to query).
    3. Click Next step.
      Create an index pattern
    4. Click Create index pattern.
  3. In the left-side navigation pane, click Discover.
  4. In the top navigation bar of the Discover page, click Label.
    Notice Label is displayed only if the bsearch_label plug-in is installed.
  5. Use one of the following methods to label the data.

    Add a tag to an existing field

    1. Find the record of user zhangsan, as shown in the preceding figure.
    2. Select the age field and add tag 18 to this field.
    3. Click make tag.
    4. Turn on history to view detailed labeling history. View labeling history

    Add a tag to a new field

    1. Find the record of user zhangsan, as shown in the preceding figure.
    2. Select custom marking field.
    3. Add the tag field and add the teenager tag to this field.
    4. Click make tag.
    5. View the labeling result. View the labeling result