我试图直接使用http来使用_mget
api:
curl -u elastic:changeme -XGET localhost:9200/index/_mget?pretty -d '
{
"docs": [
{
"_type": "coll",
"_id": "1474c1a0-2540-11e7-9271-0242ac110008"
}
]
}
'
我得到了一个不存在的回复:
{
"docs" : [
{
"_index" : "index",
"_type" : "coll",
"_id" : "1474c1a0-2540-11e7-9271-0242ac110008",
"found" : false
}
]
}
但是,我尝试使用get
api:
curl -u elastic:changeme -XGET localhost:9200/index/coll/1474c1a0-2540-11e7-9271-0242ac110008?pretty
我得到的回答是正确的:
{
"_index" : "index",
"_type" : "coll",
"_id" : "1474c1a0-2540-11e7-9271-0242ac110008",
"_version" : 1,
"_routing" : "user",
"found" : true,
"_source" : {
"user" : "user",
"timestamp" : "2017-04-18T22:00:00Z",
"startTimestamp" : "2017-04-18T22:00:00Z",
"dueTimestamp" : null,
"closingTimestamp" : null,
"matter" : "Activity 16",
"comment" : null,
"status" : 20,
"backlogStatus" : 20,
"metainfos" : {
"fbcbeacfbcbeacfbcbeacfbcbeacfbcbaeac" : [
"Project A"
],
"fceceacfcedeacfceeeacfcefeacfcfeac" : [
"Example activity"
],
"ffceacffceacffceacffceacffceac" : [
"Marketing"
],
"efeacefeacefeacefeacefeac" : [
"2017-Q3"
],
"ddfceacddfceacddfceacddfceacddfceac" : [
"West"
],
"eaaeaceabeaceaceaceadeaceaeeac" : [
"2-Important - Not urgent"
],
"eaceeaceaceeaceaceaeaceacebeaceaceceac" : [
"4-Completed"
],
"efeeeacefefeaceffeaceffeaceffeac" : [
"Oliver"
]
},
"resources" : [ ],
"notes" : null
}
}
有什么想法吗?