【发布时间】:2016-01-31 16:04:16
【问题描述】:
我知道我可以获取所有数据库
GET _all_dbs
也是数据库的最后一次更改
GET /{db}/_changes?descending=true&limit=1
结果会是这样的:
{
"results":[
{
"seq":112,
"id":"20e3480f5db4802d94a8193ac2246ae7",
"changes":[
{
"rev":"2-fb8204608047ce016282acbf3239cd01"
}
],
"deleted":true
}
],
"last_seq":112
}
现在可以将这些语句组合起来得到类似的东西:
{
"results":[
{
"db1":"1-fb8204608047ce016282acbf3239cd01"
},
{
"db2":"2-fb8204608047ce016282acbf3239cd02"
},
{
"db3":"2-fb8204608047ce016282acbf3239cd03"
},
{
"db4":"2-fb8204608047ce016282acbf3239cd04"
}
]
}
其中“db1”是数据库名称,“2-fb8204608047ce016282acbf3239cd04”是数据库的最后一个_rev。
【问题讨论】: