POST product_info/product { "productName": "产品A", "productType": "自营", "describe": "自营类产品A" }
POST product_info/_doc/ { "productName": "产品A", "productType": "自营", "describe": "自营类产品A" }
创建成功后,返回结果如下。
{ "_index" : "product_info", "_type" : "_doc", "_id" : "ivAJ2YIBDm18sYJYw3uK", "_version" : 1, "result" : "created", "_shards" : { "total" : 2, "successful" : 2, "failed" : 0 }, "_seq_no" : 0, "_primary_term" : 1 }
POST product_info/product/_bulk {"index":{}} {"productName": "产品A","productType": "自营","describe": "自营类产品A"} {"index":{}} {"productName": "产品B","productType": "自营","describe": "自营类产品B"} {"index":{}} {"productName": "产品C","productType": "第三方","describe": "第三方类产品C"} {"index":{}} {"productName": "产品D","productType": "第三方","describe": "第三方类产品D"}
POST product_info/_doc/_bulk {"index":{}} {"productName": "产品A","productType": "自营","describe": "自营类产品A"} {"index":{}} {"productName": "产品B","productType": "自营","describe": "自营类产品B"} {"index":{}} {"productName": "产品C","productType": "第三方","describe": "第三方类产品C"} {"index":{}} {"productName": "产品D","productType": "第三方","describe": "第三方类产品D"}
创建成功后,返回结果如下。
{ "took" : 27, "errors" : false, "items" : [ { "index" : { "_index" : "product_info", "_type" : "_doc", "_id" : "ZYIP2YIBTzT-TSjL5KvV", "_version" : 1, "result" : "created", "_shards" : { "total" : 2, "successful" : 2, "failed" : 0 }, "_seq_no" : 0, "_primary_term" : 1, "status" : 201 } }, { "index" : { "_index" : "product_info", "_type" : "_doc", "_id" : "ZoIP2YIBTzT-TSjL5KvV", "_version" : 1, "result" : "created", "_shards" : { "total" : 2, "successful" : 2, "failed" : 0 }, "_seq_no" : 1, "_primary_term" : 1, "status" : 201 } }, { "index" : { "_index" : "product_info", "_type" : "_doc", "_id" : "Z4IP2YIBTzT-TSjL5KvV", "_version" : 1, "result" : "created", "_shards" : { "total" : 2, "successful" : 2, "failed" : 0 }, "_seq_no" : 0, "_primary_term" : 1, "status" : 201 } }, { "index" : { "_index" : "product_info", "_type" : "_doc", "_id" : "aIIP2YIBTzT-TSjL5KvV", "_version" : 1, "result" : "created", "_shards" : { "total" : 2, "successful" : 2, "failed" : 0 }, "_seq_no" : 0, "_primary_term" : 1, "status" : 201 } } ] }
我们的产品专家为您找到最合适的产品/解决⽅案
1v1线上咨询获取售前专业咨询
专业产品顾问,随时随地沟通