Elasticsearch get started--familiar with basic operations

Source: Internet
Author: User
Tags create index kibana

Kibana provides great convenience for quick familiarity with elasticsearch operations, and is familiar with several basic operations through Kibana. CREATE INDEX

Opening dev Tools in Kibana opens the interface shown in the following figure:

On the left is the command window, the result of execution on the right.
The following is the creation of an index called Blog_index, which contains two type:user and blogpost,

PUT Blog_index {"mappings": {"user": {"Properties": {"title":    {"type": "Text"  }, 
        "name":     {"Type": "Text"  }, 
        "age":      {"type": "Integer"}  
      }
    ,
    "blogpost": { 
      "Properties": {" 
        title":    {"type": "Text"  }, 
        "body":     {"type": "Text"  }, 
        "user_id":  {
          "type":   "keyword" 
        },
        "created":  {
          "type":   "date", 
          "format": "Strict_ date_optional_time| | Epoch_millis "}}}}}

As shown in figure:

The result on the right indicates successful execution

You can add the Index pattern by management->index patterns below,

Click the Create button to save. Index Document

The following index is a user document, as follows:

{
   "title": "Manager",
   "name": "Tom Jerry",
   "age":

The Execute command is post Blog_index/user, which indicates that a document of type user is added to Blog_index. As you can see from the output on the right, adding a document succeeds and automatically _id a search

First, you can see the document you just added through Kibana's discover:

If you complete the search by command, the result is:

The command executed is:

Get/blog_index/user/_search
{"
  query": {"
    match": {
        "name": "Jerry"
}}}

Note: There cannot be a blank line between the command line and the parameter

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.