Cloudbase 2.2 Production View returns "The results of this view is empty."

Hello,

I’m quite new to Couchbase, so it’s entirely possible I’m making a rookie mistake.

I have a view which I’ve created which is designed to return a list of Entities found in my documents. The code runs find in the Development Subset, but when I publish the view and run it against production data I get the perfunctory “The results of this view is empty.” I’ve also noticed that indexing this view is very fast, and the size of the index on disk is quite small.

I think that something is failing during the Map function but I’m not sure what could be failing or how to diagnose the problem. Here’ is the view:

Map

function (doc, meta) {
if(doc.hasOwnProperty(‘Page’))
{
var pageStartDateTime = doc.Page.Lines.Line[0]["@LineDateTime"]
if(doc.Page.BroadcastMetadata.hasOwnProperty(‘EntityData’))
{
if(doc.Page.BroadcastMetadata.EntityData.hasOwnProperty(‘Entity’) &&
doc.Page.BroadcastMetadata.EntityData.Entity.length > 0)
{
for(var entityIndex in doc.Page.BroadcastMetadata.EntityData.Entity)
{
var entity = doc.Page.BroadcastMetadata.EntityData.Entity[entityIndex];
emit([entity[’#text’], doc.Page[’@StationGUID’]].concat(dateToArray(pageStartDateTime)),null)
}
}
}
}
}

Reduce

_count

If Map throws an exception or otherwise fails, what happens? Is the individual document skipped, or does the entire index fail?

How can I log exceptions inside the map function for debugging?

How should I investigate this issue?

Thanks so much!

-D