0

I try to map and reduce datas with a couchbase view.

While in dev, everything is ok. The value returned by the reduce function is the json formated doc i'm waiting.

But when I publish the view in prod, I only got null values (keys seems to be ok : they are the same, but no value anymore).

I've tried with a simpler view (a custom _count) and the prod view gives me 3 for each key (which is obviously false) while it seems ok in dev

I can't see any error reported.

Does anyone has a clue ?

Why do dev and prod view give so different results without any error ?

How can I debug my view in this context ?

May it be a problem with the RAM size ?

The map function looks like :

function (doc, meta) {
  if (doc.EXENUM_A != "")
  {
    if (doc.PRS != "") {
      emit(doc.EXENUM_A, { ... });
    }
  }
}

And the reduce one :

function (keys, values) {
  for (k in keys) {
    result = {"PRS":{}};
    for (v in values) { // result is modified
    ... }
    return result;
  }
}

In dev, i get dictionary return values, in prod, i get null return values.

Jice
  • 191
  • 4
  • 16

1 Answers1

0

View in development mode works on a subset of documents

Loki
  • 659
  • 1
  • 8
  • 18