Multi GET API
生活随笔
收集整理的這篇文章主要介紹了
Multi GET API
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
Multi GET? API介紹
GET /lib/user/_mget {"docs":[{"_id":1},{"_type":"user","_id":2}] }#返回值?
{"docs" : [{"_index" : "lib","_type" : "user","_id" : "1","_version" : 1,"_seq_no" : 7,"_primary_term" : 1,"found" : true,"_source" : {"first_name" : "Jane","last_name" : "Smith","age" : 36,"about" : "I like to collect rock albums","interests" : ["music"]}},{"_index" : "lib","_type" : "user","_id" : "2","_version" : 1,"_seq_no" : 3,"_primary_term" : 1,"found" : true,"_source" : {"first_name" : "Jane","last_name" : "tom","age" : 38,"about" : "I like to collect rock albums","interests" : ["music"]}}] }更簡(jiǎn)單的:
GET /lib/user/_mget {"ids":["1","2","3"] }返回結(jié)果:?
{"docs" : [{"_index" : "lib","_type" : "user","_id" : "1","_version" : 1,"_seq_no" : 7,"_primary_term" : 1,"found" : true,"_source" : {"first_name" : "Jane","last_name" : "Smith","age" : 36,"about" : "I like to collect rock albums","interests" : ["music"]}},{"_index" : "lib","_type" : "user","_id" : "2","_version" : 1,"_seq_no" : 3,"_primary_term" : 1,"found" : true,"_source" : {"first_name" : "Jane","last_name" : "tom","age" : 38,"about" : "I like to collect rock albums","interests" : ["music"]}},{"_index" : "lib","_type" : "user","_id" : "3","found" : false}] }?
?
?
?
?
總結(jié)
以上是生活随笔為你收集整理的Multi GET API的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 计算机相关科幻小说,科幻小说家和计算机科
- 下一篇: Android保存自定义路径的图片的一些