Problem querying on Eventstore

Good evening,

Today I was trying to perform some queries on Eventstore, the results came through quite easily (99% of the time) but not with the following one:
$init: function() {
return [];
“stock_quantity”: function(s, e) {
if (s.length < 20 && === “SOFA001GRY-ME”) {
return s;


I can confirm that there are events with that SKU on Eventstore, on the stream and on that event type. I did similar queries to another streams with similar events (with SKU field) and they worked perfectly. The only thing a little bit strange on this stream is that few thousand of the first initial events are missing (we delete them). Could it this be the problem? Am I missing something? BTW when the query is execute it after few seconds the text “Completed/Stopped/Writing results” appears but Eventstore never prints the result on the “state” section.

Can anyone help me with it?


Do you see anything in the server logs that might indicate a failure?
Your projection looks fine to me.