1

我正在使用 mongoosastic 3.1.2、mongoose ~4.0.5、mongodb 3.0.3 和 elasticsearch 1.6 来获取我的集合的映射,但现有文档无法在弹性搜索中编制索引,问题也出在

function SyncCollection (){
    var stream = model.synchronize()
        , count = 0;

    stream.on('data', function(err, doc){
        count++;
    });
    stream.on('close', function(){
        console.log('indexed ' + count + ' documents from Collection!');
    });
    stream.on('error', function(err){
        console.log(err);
    });
}

stream.on 方法不起作用的地方。

提前致谢。

4

0 回答 0