测试数据

这里建立两个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 两条数据

Last updated

Was this helpful?