Mongoose stream return few results first time

I am working on a new real time news service, right now I have a problem that I don´t know how to solve.

First off when the user connect to the NodeJS server I create a Mongoose stream thus I can return this data easily and rapidly.

The problem I have right now is to return the first time just a few set of data, with the next code it's returning all the collection:

io.sockets.on('connection', function(socket) {
    console.log("New user has been connected");

    var stream = News.find().tailable().stream();

    stream.on('error', function (err) {
      console.error(err)
    });

    stream.on('data', function (doc) {
      socket.emit("newArticle", doc);
    }); 
}); 

So, the question is... how I can return the first time just the latest ten results?

Have you tried limiting the query? Like shown in the mongoose.js docs under queries.

With your code it would be

io.sockets.on('connection', function(socket) {
  console.log("New user has been connected");

  var stream = News.find().tailable().limit(10).stream();

  stream.on('error', function (err) {
    console.error(err)
  });

  stream.on('data', function (doc) {
    socket.emit("newArticle", doc);
  });
});

Finally I do it limiting the query from the current time minus half an hour, in this way the first time I am just getting a little set of data.