Learning ElasticSearch: create an index Library

1, to create an index Library

  • Use postman create an index library, I use es is 5.6.8 version, created different versions slightly different (usually more than 7.x)
  • Json data transmission using postman
{
    "mappings":{
        "articles":{
            "properties":{
                "id":{
                    "type":"long",
                    "store":true
                },
                "title":{
                    "type":"text",
                    "store":true,
                    "index":"analyzed",
                    "analyzer":"standard"
                },
                "content":{
                    "type":"text",
                    "store":true,
                    "index":"analyzed",
                    "analyzer":"standard"
                }
            }
        }
    }
}

Here Insert Picture Description

  • blog1 here is our index database name, here is equivalent to a database. put the request is meant to create. mapping is a keyword, referring to the maps, articles refers to the type, the equivalent of a database table, properties refers to a field equivalent to fields in the database.
  • Get the return result
    Here Insert Picture Description
  • Creating success
    Here Insert Picture Description
  • Also directly can create an index es graphical interface, click New Index
    Here Insert Picture Description
  • This index is created inside, mapping is empty, we can use to set mapping postman again
    Here Insert Picture Description
    Here Insert Picture Description

2, delete the index database

  • Mode change request to delete
    Here Insert Picture Description
Published 134 original articles · won praise 91 · views 160 000 +

Guess you like

Origin blog.csdn.net/weixin_44588495/article/details/103228312