Couchbase range query -


i have testa couchbase 4 server, store sensor measurement data.

i have following view:

function (doc, meta) {   if (doc.aks) {     emit([doc.aks, doc.timestamp], {       value: doc.value,       status: doc.status     });   } } 

here example document:

{    "timestamp": 1199180981,    "value": 0,    "status": 2147483650,    "aks": "bn028:h23:vs:001:zustand" } 

i try following query view: give me timerange of values single sensor.

/_view/timeline?stale=false&startkey=["bn020:h03:zw:102:mc_t_return",12675419334]&endkey=["bn020:h03:zw:102:mc_t_return",13675419334]

but give no result.

i result if jsut use startkey= or endkey= not if use both. wrong?

make sure have data in bucket fall within range. used view , query , received results. example document not within range, aks wrong , timestamp early. if add document in range should receive back. 1 lower bound of range:

{     "timestamp": 12675419334,     "value": 0,     "status": 2147483650,     "aks": "bn020:h03:zw:102:mc_t_return" } 

Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -