问题
I am following these instructions: https://www.compose.com/articles/mongoosastic-the-power-of-mongodb-and-elasticsearch-together/
I have a TSV file (17MB) that I am iterating through. I am watching my Indexed results with the following code:
Entry.on('es-indexed',(e,r)=>{
console.log(`Indexed Result: ${r}
Indexed Error: ${e}`);
})
Some of my data is getting indexed properly, but I get many error messages too:
Indexed Result: undefined
Indexed Error: Error: Request Timeout after 30000ms
Here is my model.js file
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);
来源:https://stackoverflow.com/questions/45155361/inserting-large-amounts-of-data-to-mongoose-elasticsearch-via-mongoosastic