Location>code7788 >text

We recommend a lightweight and powerful Elasticsearch GUI: elasticvue.

Popularity:508 ℃/2024-12-16 01:41:48

We recommend a lightweight and powerful Elasticsearch GUI: elasticvue.

Many students have used Elasticsearch's GUI tool Kibana, but Kibana is relatively heavy, this article, I recommend recommending alight-weight class (in athletics)both (... and...)largeThe Elasticsearch GUI:elasticvue

/blog/2487169/202412/

1 Download and install

Enter:/cars10/elasticvue/releases/tag/v1.1.0

/blog/2487169/202412/

Since I am using macOS, I downloaded the corresponding .dmg file.

After the installation is complete, click on the icon to display the following:

/blog/2487169/202412/

2 Cluster Configuration

strike (on the keyboard)Adding an ELASTICSEARCH Clusterbutton to select different authentication methods (no authentication, username and password, API key).

/blog/2487169/202412/

strike (on the keyboard)test connectionIf you are not able to do so, you will be able to connect after the success pop-up.

/blog/2487169/202412/

As shown in the figure, the cluster home page displays the cluster's node information, cluster health, and so on.

The first column of the home page has a lot of action options:Nodes, sharding, indexing, searching, REST, snapshots, configuration

/blog/2487169/202412/

2 Creating Indexes

Creating an index in Elasticsearch is a relatively simple process that can be accomplished by sending an HTTPPUT request to complete.

When you create an index, you define the settings and mappings for the index.

Specific example steps are as follows:

1. Preparatory work

Make sure you have Elasticsearch installed and running, and that you can interact with it through command-line tools such as curl, programming language clients, or through Kibana's Dev Tools console.

This section describes how elasticvue interacts with ES to create indexes through the GUI interface.

2. Design an example index

PUT /
{
  "mappings": {
    "properties": {
      "dir_name": {
        "type": "text",
        "fields": {
          "keyword": {
           "type": "keyword"
          }
        }
      },
      "entity_type": {
        "type": "keyword"
      },
      "entity_id": {
        "type": "keyword"
      },
      "add_time": {
        "type": "date",
        "format": "yyyy-MM-dd HH:mm:ss||epoch_millis"
      },
      "u_time": {
        "type": "date",
        "format": "yyyy-MM-dd HH:mm:ss||epoch_millis"
      },
      "tags": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword"
          }
        }
      }
    }
  }
}

In Elasticsearch (ES).PUT method for creating or updating an index, document, or setting , the request body contains amappings section, this is used to define the structure of the documents in the index and the data types of the fields. The mapping is the blueprint for the structure of documents within the index, and it tells Elasticsearch how to process and store the data.

3、Rest interface to create an index

Click the REST button to copy the example index to the left text box, and the right text box will return the response result after you click to initiate the request.

/blog/2487169/202412/

3 Adding data

We can add index data using the POST command in the following format:

PUT /<index-name>/_doc/<document-id>
{
  "field1": "value1",
  "field2": "value2", // More fields...
  // More fields...
}

We add 1 piece of example data:

POST //_doc/1
{
  "dir_name": "Supplier:KHBH-20241016-0001",
  "entity_type": "info_supplier",
  
  "add_time": "2024-11-06 10:59:00",
  "u_time": "2024-11-06 10:59:00",
  "tags": ["vendor", "2024", "new_cooperation"]
}

/blog/2487169/202412/

4 Viewing the Index

Click on the Index column to enter the example index, you can view all the indexed data, click on the rightmost action button to view the data details.

/blog/2487169/202412/