vq := gocouchbase.NewViewQuery("users", "get_user_by_id").Key(UserID)
rows := Connector.ExecuteViewQuery(vq)
var row ViewRow_cb
if rows.Next(&row) {
index = uint64(row.Key)
token = int64(row.Value.(float64))
}
and this is my view:
function (doc) {
if (doc.type == "user")
emit(doc.id, doc.token);
}
when i run it i get 0 rows back from the server but when i run it without the Key i get N rows(where N is the number of user documents in the DB)
I tried to do it with Range and also modified viewquery.go and add vq.options.Set("inclusive_end", "true") like i do in a webrequest, still no results.
Could you show me the HTTP query you have that does work? I suspect you may be using Key in place of Id or some other issue than a ViewQuery generation issue directly.
It certainly will be, and that release is scheduled for the first Tuesday of March, though I am considering doing it a little earlier if we are ahead of schedule