insert data into es

insert data into es

Learned: https://www.imooc.com/video/15769/0

It is divided into two types: specified Id and automatically generated Id;

1. Specify the Id to use the PUT operation

PUT http://127.0.0.1:9200/people/man/1

{
    "name":"stono",
    "country":"China",
    "age":111,
    "date":"1999-11-11"
}

2. Automatically generate Id using POST operation

POST http://127.0.0.1:9200/people/man/

{
    "name":"stono22",
    "country":"China",
    "age":22,
    "date":"1999-11-11"
}

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325211198&siteId=291194637