{"action":"created","issue":{"url":"https://api.github.com/repos/mongoosastic/mongoosastic/issues/80","labels_url":"https://api.github.com/repos/mongoosastic/mongoosastic/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/mongoosastic/mongoosastic/issues/80/comments","events_url":"https://api.github.com/repos/mongoosastic/mongoosastic/issues/80/events","html_url":"https://github.com/mongoosastic/mongoosastic/issues/80","id":81361165,"number":80,"title":"Mongoosastic Performance","user":{"login":"aalireza439","id":920466,"avatar_url":"https://avatars.githubusercontent.com/u/920466?v=3","gravatar_id":"","url":"https://api.github.com/users/aalireza439","html_url":"https://github.com/aalireza439","followers_url":"https://api.github.com/users/aalireza439/followers","following_url":"https://api.github.com/users/aalireza439/following{/other_user}","gists_url":"https://api.github.com/users/aalireza439/gists{/gist_id}","starred_url":"https://api.github.com/users/aalireza439/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aalireza439/subscriptions","organizations_url":"https://api.github.com/users/aalireza439/orgs","repos_url":"https://api.github.com/users/aalireza439/repos","events_url":"https://api.github.com/users/aalireza439/events{/privacy}","received_events_url":"https://api.github.com/users/aalireza439/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mongoosastic/mongoosastic/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-27T09:11:37Z","updated_at":"2015-05-29T13:21:53Z","closed_at":null,"body":"I have JSON file with more than 90k content when i use Mongoosastic and mangoose for importing json file my resource usage go more than 90% percent , but when i am  using just only mongoose is barley go more than 30% percent.\r\n\r\nmy Mongoosastic setup it simple using , here code i use :\r\n```\r\nvar musicSchema = new Schema({\r\n  song_id:  { type : String ,index: true, unique : true, required : true, dropDups: true , es_indexed:true },\r\n  song_name:  { type : String , es_indexed:true },\r\n  english_name:  { type : String , es_indexed:true },\r\n  artist_name:  { type : String , es_indexed:true },\r\n  artist_id:  { type : String , es_indexed:true },\r\n  big_poster:  { type : String , es_indexed:true },\r\n  poster:  { type : String , es_indexed:true },\r\n  duration: { type : String , es_indexed:true },\r\n  mp3_link_low:  { type : String , es_indexed:true },\r\n  mp3_link:  { type : String , es_indexed:true },\r\n  created: { type: Date, default: Date.now , es_indexed:true },\r\n  musicId:{ type : String , es_indexed:true },\r\n  path: { type : String , es_indexed:true }\r\n});\r\nmusicSchema.plugin(mongoosastic);\r\nvar music = mongoose.model('music', musicSchema);\r\n\r\n  music.createMapping(function(err, mapping){  \r\n\tif(err){\r\n\t  console.log('error creating mapping (you can safely ignore this)');\r\n\t  console.log(err);\r\n\t}else{\r\n\t  console.log('mapping created!');\r\n\t  console.log(mapping);\r\n\t}\r\n\t}); \r\n\r\nvar mymusic = new music({\r\n\t  song_id: 'content[i].id' ,\r\n\t  song_name: content[i].songname ,\r\n\t  artist_name:  content[i].artist,\r\n\t  english_name:  english_name.toLowerCase(),\r\n\t  artist_id: content[i].artist_id,\r\n\t  big_poster:  encodeURI(content[i].poster_big),\r\n\t  poster:  encodeURI(content[i].poster),\r\n\t  duration: content[i].time,\r\n\t  mp3_link_low:  encodeURI(content[i].mp3_low),\r\n\t  mp3_link:  encodeURI(content[i].mp3),\r\n\t  path : path.toLowerCase()\r\n\t });// end save new music\r\n\r\n\t\t\t\t\t\t\t\t\t \r\n\t mymusic.save(function(err){\r\n\t\tif(err)\r\n\t\t\tconsole.log(err);\r\n\t\telse\r\n\t\t\tconsole.log(mymusic);\r\n\t }); // end save mongodb\r\n\r\n\t\r\n\t music.on('es-indexed', function(err,res) {}) \t \t\r\n```\r\n\r\ni want know there is any config to get better Performance ?"},"comment":{"url":"https://api.github.com/repos/mongoosastic/mongoosastic/issues/comments/106801049","html_url":"https://github.com/mongoosastic/mongoosastic/issues/80#issuecomment-106801049","issue_url":"https://api.github.com/repos/mongoosastic/mongoosastic/issues/80","id":106801049,"user":{"login":"guumaster","id":765396,"avatar_url":"https://avatars.githubusercontent.com/u/765396?v=3","gravatar_id":"","url":"https://api.github.com/users/guumaster","html_url":"https://github.com/guumaster","followers_url":"https://api.github.com/users/guumaster/followers","following_url":"https://api.github.com/users/guumaster/following{/other_user}","gists_url":"https://api.github.com/users/guumaster/gists{/gist_id}","starred_url":"https://api.github.com/users/guumaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guumaster/subscriptions","organizations_url":"https://api.github.com/users/guumaster/orgs","repos_url":"https://api.github.com/users/guumaster/repos","events_url":"https://api.github.com/users/guumaster/events{/privacy}","received_events_url":"https://api.github.com/users/guumaster/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T13:21:53Z","updated_at":"2015-05-29T13:21:53Z","body":"I've never tried the River plugin."}}