Alibaba Cloud Kibana provides two built-in plug-ins that are based on open source community plug-ins: BSearch-QueryBuilder (advanced query) and bsearch_label (data labeling). This topic describes how to install and uninstall these Kibana plug-ins.
Install a plug-in
Usage notes
Kibana plug-ins are supported only on Alibaba Cloud Elasticsearch V6.3 and V6.7 instances.
Before you install a plug-in, ensure your Kibana node has at least 2 vCPUs and 4 GB of memory. If not, upgrade the Kibana node. For more information, see upgrade cluster configuration.
Custom Kibana plug-ins are not supported.
Procedure
Log on to the Alibaba Cloud Elasticsearch console.
In the left-side navigation pane, click Elasticsearch Clusters.
In the top navigation bar, select a resource group and a region.
On the Elasticsearch Clusters page, click the ID of the target instance.
In the left-side navigation pane, click Data Visualization.
In the Kibana section, click Modify Configuration.
In the Plug-in Configuration section, find the plug-in that you want to install and click Install in the Actions column.
ImportantInstalling a plug-in restarts the Kibana node, making Kibana unavailable during the process. We recommend that you perform this operation during off-peak hours.
In the Install confirmation dialog box, click OK.
After the node successfully restarts, the plug-in is installed. The status of the plug-in changes to Installed.
Query data with BSearch-QueryBuilder
BSearch-QueryBuilder is a front-end plug-in that lets you create complex queries visually without writing complicated Domain-Specific Language (DSL) statements.
Background information
Query DSL is an open source Java framework for building type-safe SQL-like queries. It allows you to build queries by using its fluent API instead of concatenating strings. Query DSL supports platforms such as JPA, JDO, SQL, Java Collections, RDF, Lucene, and Hibernate Search.
This DSL consists of abstract query expressions. A specific query can contain other queries, such as a bool query. Some queries can contain filters, such as a constant_score query, and others can contain both queries and filters, such as a filtered query. You can combine these expressions and filters to build complex queries. However, writing DSL queries can be error-prone and typically requires expertise. The QueryBuilder helps users who are unfamiliar with Elasticsearch DSL or want to write DSL queries more efficiently.
The BSearch-QueryBuilder plug-in provides the following features:
Easy to use: BSearch-QueryBuilder provides a visual point-and-click interface to build Elasticsearch DSL queries. You can query data based on custom conditions without writing any code. This reduces the learning curve for complex DSL queries. The plug-in also helps developers write or verify DSL statements.
Convenient: You can save complex query conditions defined in Kibana for reuse.
Lightweight: The plug-in occupies only about 14 MB of disk space and does not run persistently in memory. It does not affect the performance of Kibana or Elasticsearch.
Secure and reliable: BSearch-QueryBuilder does not modify, store, or forward your data. Its source code has passed the Alibaba Cloud security audit.
BSearch-QueryBuilder works only with Alibaba Cloud Elasticsearch V6.3 and V6.7 instances.
Procedure
Log on to the Kibana console of your Alibaba Cloud Elasticsearch instance.
For more information, see Log on to the Kibana console.
Optional: In the left-side navigation pane, click Management and follow these steps to create an index pattern.
ImportantIf you have an existing index pattern, skip this step.
On the Management page, click Index Patterns in the Kibana section.
On the Create index pattern page, enter an index pattern name. The name must match the index you want to query.
Click Next step.

Click Create index pattern.
In the left-side navigation pane, click Discover.
On the Discover page, click Query in the upper-right corner.
In the query area, add query and filter conditions, and then click Submit.

Click the
icon to add a query condition.Click the
icon to add a nested filter condition to the query.Click the
icon to delete a query or filter condition.
BSearch-QueryBuilder supports multiple query methods, such as fuzzy searches, multi-condition queries, and custom time-range queries. The following examples demonstrate these methods.
Fuzzy search
The following figure shows a fuzzy search on the email field, where email must be a fuzzy match for iga.

The following figure shows the matching results.

Query with multiple conditions
The query conditions in the following figure specify that the index must be tryme_book, and a filter is applied to the type field. The type must be College supplementary materials, Mathematics, Teaching Chinese as a Foreign Language, or College textbooks.

The following figure shows the matching results.

Query with a custom time range
To filter data by a time field, use the time-based filtering feature. The following example filters the utc_time field to query for data within the range of
[now-240d, now].
The following figure shows the matching results.

Label data with bsearch_label
bsearch_label is a front-end data labeling plug-in. You can use this plug-in to visually label data without writing DSL statements. By labeling data, you can assign a specific tag value to a field or a new field. This allows you to run aggregate statistics or quickly filter data by label.
Procedure
Log on to the Kibana console of the target Alibaba Cloud Elasticsearch instance. For more information, see Log on to the Kibana console.
Optional: In the left-side navigation pane, click Management and follow these steps to create an index pattern. If you have an existing index pattern, you can skip this step.
On the Management page, click Index Patterns in the Kibana section.
On the Create index pattern page, enter an index pattern name. The name must match the index you want to query.
Click Next step.
Click Create index pattern.
In the left-side navigation pane, click Discover.
On the Discover page, click Label in the upper-right corner.
The Label button is available only after you install the bsearch_label plug-in.
Choose one of the following methods to label your data.
Label an existing field
Query for the data that you want to label. For example, query for the data where the name is Zhang San.
Select the
agefield and set it to18.Click Confirm Labeling.
Enable the Labeling History switch to view your labeling history.
Label a new field
Query for the data that you want to label. For example, query for the data where the name is Zhang San.
Select the Custom Labeling Field checkbox.
Add a field
tagand mark it asteenager.Click Confirm Labeling to view the labeling results.
Uninstall a plug-in
In the Plug-in Configuration section, find the plug-in that you want to uninstall, click Remove in the Actions column, and follow the on-screen instructions.
Uninstalling a plug-in also restarts the Kibana node, making Kibana unavailable during the process. We recommend performing this operation during off-peak hours.