The simplest query executed inside my eventing function always returns empty results

I have a different eventing function scoped to a different bucket that works fine. Is there some permissions or configuration I need for the bucket? I’m using Enterprise Edition 7.1.1 build 3175

function OnUpdate(doc, meta) {
log(“Doc created/updated”, meta.id);
var results = select * from xxxx;
log(results);
results.close
}

function OnDelete(meta, options) {
log(“Doc deleted/expired”, meta.id);
}

Do u have index on the bucket

execute same query in web console and check

Yes, both a primary index and an index on the meta.id

Yes, I have an index and yes the query works in the console.

You might have to iterate results actually send it to server before you log.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.