title: elastic search index_not_found error when there is no data in mongodb
body: <p>Hi I am using monoosastic to connect my mongodb with elastic search. If I have data in mongodb the search is working fine but if the collection is empty I am getting error as index-not-found error in elastic search. below is my code</p>
  <pre><code>schema.plugin(mongoosastic, {
  hosts: [ELASTICSEARCH_NODE],
  index:ELASTICSEARCH_INDEX_NAME
  });
  setInterval(function () {
  var stream = Model.synchronize();
  var count = 0;
  stream.on('data', function (err, doc) {
  if (err) {
    console.log('data error', err, doc);
  }
  count++;
  });
  stream.on('close', function () {
  console.log('elastic search closed');
  console.log('elastic search count -', count);
  });
  stream.on('error', function (err) {
  console.log('elastic search error data', err);
  });
  }, 30000);
  </code></pre>
  <p>I tried changing the properties as below</p>
  <pre><code>schema.plugin(mongoosePaginate);
    schema.plugin(mongoosastic, {
    hosts: [ELASTICSEARCH_NODE],
    index: ELASTICSEARCH_INDEX_NAME,
    indexAutomatically:true,
    customProperties:{
      &quot;persistent&quot;: {
        &quot;action.auto_create_index&quot;: &quot;true&quot; 
      }
      }
     });
  </code></pre>
  <p>But there is no change still facing the same error. Kindly help me with a solution.</p>