GetView returns null IViewRow objects

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!!!

Hi,
with a lucky trial I solved the problem: I replaced the call

  var view = couchbaseClient.GetView("beer", "by_name");

with the overload

  var view = couchbaseClient.GetView("beer", "by_name", true); 

Cheers!!

traxx -

Good to see you found a work-around, but this is actually a regression bug: https://www.couchbase.com/issues/browse/NCBC-416

You can expect this to be fixed with the next release in early April 2014: 1.3.5

-Jeff

Thanks Jeff!!!

OMG, I get this issue everyday. Today it still exists in Couchbase 3.0.1 and .net sdk 1.3.10 when I query view :scream:

Yeah, i am seeing the same issue.