1、以root身份后台运行ES:
./elasticsearch -Des.insecure.allow.root=true -d
2、插入文档
localhost:9200/megacorp/employee/3?pretty put
{
"first_name" : "Douglas",
"last_name" : "Fir",
"age" : 35,
"about": "I like to build cabinets",
"interests": [ "forestry" ]
}
3、查询文档
localhost:9200/megacorp/employee/3