Hi there,
I’m just learning the Couchbase .NET SDKs and I’m trying to query a view.
I’ve created (using some online examples) the by_name view on the beer-sample bucket:
function (doc, meta) {
if (doc.type && doc.type == “beer” && doc.name)
emit(doc.name, null);
}
and I’m using a Console application (.NET 4.0) to retrieve the view rows:
CouchbaseClient couchbaseClient = new CouchbaseClient();
var view = couchbaseClient.GetView("beer", "by_name");
foreach (var row in view)
{
Console.WriteLine("Key: {0}, Value: {1}", row.Info["key"], row.Info["value"]);
}
The view is correctly retrieved and it returns a TotalRows of 5891.
Unfortunately each IViewRow is null (so the code in the foreach raises an exception).
This seems to happen also with the other views (for example the brewery_beers).
Any idea?
Thanks in advance!!!