测试数据
这里建立两个index(crm,oa),每个索引库中一个type(employee)
第一个index:crm,type:employee 两条数据
curl -XPOST 'http://localhost:9200/crm/employee/' -d '
{
"email": "john@smith.com",
"first_name": "John",
"last_name": "Smith",
"info": {
"bio": "Eco-warrior and defender of the weak",
"age": 25,
"interests": [ "dolphins", "whales" ]
},
"join_date": "2016/05/01"
}'
curl -XPOST 'http://localhost:9200/crm/employee/' -d '
{
"email": "cnccoo@qq.com",
"first_name": "revin",
"last_name": "bian",
"info": {
"bio": "Eco-warrior and defender of the weak",
"age": 28,
"interests": [ "sing", "dance" ]
},
"join_date": "2015/05/01"
}'
第二个index:oa,type:user 两条数据
curl -XPOST 'http://localhost:9200/oa/user/' -d '
{
"email": "john@smith.com",
"user_name": "herry li",
"info": {
"sex": "boy",
"age": 24,
"interests": [ "dolphins", "whales" ]
},
"join_date": "2014/05/01"
}'
curl -XPOST 'http://localhost:9200/oa/user/' -d '
{
"email": "john@smith.com",
"user_name": "herry hong",
"info": {
"sex": "girl",
"age": 21,
"interests": [ "dolphins", "whales" ]
},
"join_date": "2014/06/01"
}'
curl -XPOST 'http://localhost:9200/oa/user/' -d '
{
"email": "john@smith.com",
"user_name": "herry hong",
"info": {
"sex": "girl",
"age": 21,
"interests": [ "dolphins", "sing","reding","dance" ]
},
"join_date": "2014/06/01"
}'
curl -XPOST 'http://localhost:9200/oa/user/' -d '
{
"email": "john@smith.com",
"user_name": "herry hong",
"info": {
"sex": "girl",
"age": 21,
"interests": [ "dolphins", "sing" ]
},
"join_date": "2014/06/01"
}'
Last updated
Was this helpful?