0

我正在遵循这些说明: https ://www.compose.com/articles/mongoosastic-the-power-of-mongodb-and-elasticsearch-together/

我有一个正在迭代的 TSV 文件 (17MB)。我正在使用以下代码查看我的索引结果:

Entry.on('es-indexed',(e,r)=>{
      console.log(`Indexed Result: ${r}
        Indexed Error: ${e}`);
    })

我的一些数据被正确编入索引,但我也收到许多错误消息:

Indexed Result: undefined
        Indexed Error: Error: Request Timeout after 30000ms

这是我的 model.js 文件

const ChebiName = new mySchema({
  name: {
    type: String,
    required: true,
    es_indexed: true
  },

  id: {
    type: Number,
    required: true
  }
});

ChebiName.plugin(mongoosastic);
module.exports = mongoose.model('ChebiName',ChebiName);
4

0 回答 0