I have some documents inside a bucket,As follows:
ID
point1.cpu.usage
Сontent {“endpoint”:“point1”,“id”:1,“metric”:“cpu.usage”,“value”:0.8,“counterType”:"",“tags”:"",“timestamp”:1448970519}
ID
point1.mem.usage
Сontent
{“endpoint”:“point1”,“id”:2,“metric”:“mem.usage”,“value”:0.7,“counterType”:"",“tags”:"",“timestamp”:1449133766}
ID
point1.network.intput
Сontent
{“endpoint”:“point1”,“id”:3,“metric”:“network.input”,“value”:0.6,“counterType”:"",“tags”:"",“timestamp”:1449133757}
ID
point1.network.output
Сontent
{“endpoint”:“point1”,“id”:4,“metric”:“network.output”,“value”:0.5,“counterType”:"",“tags”:"",“timestamp”:1449133775}
My Views,As follows:
function (doc, meta) {
if ( doc.endpoint == ‘poin1’)
emit(doc.id, doc.timestamp);
}
IdRange function can query range?start and end parameters is 1448970519 and 1449133766?
expectation, As follows:
ID
point1.mem.usage
Сontent
{“endpoint”:“point1”,“id”:2,“metric”:“mem.usage”,“value”:0.7,“counterType”:"",“tags”:"",“timestamp”:1449133766}
ID
point1.network.intput
Сontent
{“endpoint”:“point1”,“id”:3,“metric”:“network.input”,“value”:0.6,“counterType”:"",“tags”:"",“timestamp”:1449133757}
ID
point1.network.output
Сontent
{“endpoint”:“point1”,“id”:4,“metric”:“network.output”,“value”:0.5,“counterType”:"",“tags”:"",“timestamp”:1449133775}
actual results,As follows:
ID
point1.cpu.usage
Сontent {“endpoint”:“point1”,“id”:1,“metric”:“cpu.usage”,“value”:0.8,“counterType”:"",“tags”:"",“timestamp”:1448970519}
ID
point1.mem.usage
Сontent
{“endpoint”:“point1”,“id”:2,“metric”:“mem.usage”,“value”:0.7,“counterType”:"",“tags”:"",“timestamp”:1449133766}
ID
point1.network.intput
Сontent
{“endpoint”:“point1”,“id”:3,“metric”:“network.input”,“value”:0.6,“counterType”:"",“tags”:"",“timestamp”:1449133757}
ID
point1.network.output
Сontent
{“endpoint”:“point1”,“id”:4,“metric”:“network.output”,“value”:0.5,“counterType”:"",“tags”:"",“timestamp”:1449133775}
IdRange function do not take effect?
1.https://godoc.org/github.com/couchbase/gocb#ViewQuery.IdRange is start and end parameters error?
Thanks for helping