Optional visual client tools for Elasticsearch

foreword

As the saying goes: If a worker wants to do a good job, he must first sharpen his tools. For our development and testing students, having a handy tool in our daily work is really like adding wings to a tiger. The work efficiency can increase steadily, and it would be great to save time to fish for fish. Recently, our system started to use elasticsearch to support search, so we wanted to find a client software similar to Navicat for MySQL on the Internet, which can easily access the data in the ES cluster and help us have more time to fish .

Four recommended clients on the Internet:

1、Elasticsearch-Head:

         A browser plug-in with a single function, it can only support the query of index data, and cannot perform addition, deletion, and modification operations. If it is only used by testers, it can barely be used to view the data interface, but if it is a developer, So how can it be done without adding, deleting, and modifying? Just throw it away.

2、ElasticHD:

        Desktop software needs to be installed. The interface is much more beautiful than Elasticsearch-Head, and the supported functions are relatively simple. It can only be used for query, and it also needs to write DSL statements. Anyone can remember this statement, so just discard it.

3、Kinaba:

        This is the client officially recommended by ES. It is installed on the ES cluster machine, and then provides a URL for access. It can be said to be a web version of the client.

        Index data operation: it can query without writing DSL statements. This is a great improvement, but it does not support adding, deleting, and modifying without writing DSK statements. For those of us who are not familiar with DSL statements, it is a Very headache. Think about it or have to investigate again

4、NexNoSQL Client:

        It is a three-in-one visual client management tool that supports Elasticsearch, Redis, and MongoDB. It is also a desktop software that needs to be installed. After installation, you can add these three clusters, and then perform corresponding operations, as shown in the figure below:

 

 Advantages of operating ES with NexNoSQL Client

1. No need to write DSL to operate index data:

For example, if we want to query the data of age=2, all of them are selected in the drop-down list box, and then fill in the number 2, and click query to query all the data we need. It supports viewing the total amount and paging, as shown in the figure below:

 Is it very convenient? If we want to write DSL statements, we have to write so many:

GET test_index/_search
{
  "query": {
    "term": {
      "age": {
        "value": 2
      }
    }
  }
}

Comparing the two methods, the efficiency can be more than doubled.

2. No need to write DSL to operate the index structure:

At this time, if I want to modify the structure of the index, the current test_index only has two fields, uid and age. At this time, I want to add the name field, so how to operate NexNoSQL Client is actually very simple, click "Modeling" TAB, then click "add item", a new line will be added, then we enter name, select the type of name, here we choose text, let it support word segmentation search, and then click save to get it done:

 I won't write out the specific DSL script, it's too long, and I feel like scolding my mother.

3. No need to write DSL operation index template structure

Haha, have you forgotten that there are index templates? In fact, when using es, index templates are really good modeling entities. The data that can be stored in a single index is not easy to be too large. What should we do? We You can build an index template first, and then automatically generate an index according to certain rules. If you don’t understand it well, you can refer to log4j or logback to generate log files. The principle of generating log files is similar. For example, our project stores data according to different indexes. Generated by day and month respectively.

 

 This is much easier than writing DSL statements. Can you stand it? ? ?

4. No need to write DSL operation index alias structure

Isn't it little attention to index aliases? The index alias is somewhat similar to the view of MySQL. It can create an alias for multiple indexes. For example, we provide an alias to the outside world. In fact, the data of ten indexes is queried internally. Then there are two types of operations on aliases: the first type is data query, and the second type is to establish the relationship between index aliases and indexes. Data query is actually exactly the same as index data query, so I won’t go into details here. Let me show you how to create an index relationship:

 What you see is what you get, let's keep playing and dancing.

Summarize:

From the four visualization clients recommended on the Internet, we listed them one by one from the convenience of use, from difficult to easy, and finally introduced the magic tool of NexNoSQL Client in detail. Seeing this, do you feel that even Xiaobai can easily handle the operation of ES.

Guess you like

Origin blog.csdn.net/duzm200542901104/article/details/130091230