@ersinfotech/es-indexer

索引提交框架

Usage no npm install needed!

<script type="module">
  import ersinfotechEsIndexer from 'https://cdn.skypack.dev/@ersinfotech/es-indexer';
</script>

README

es-indexer

索引提交框架

Props

{
  es: {
    baseUrl: 'http://localhost:9200',
    index: 'facebook',
    type: 'feed'
  },
  maxIdPath: __dirname + '/../maxid',
  initMaxId: 0,
  getMaxId: function(results) {
    return _.last(results).id;
  },
  getDataAsync: function(maxId) {
    return Promise.resolve([]);
  }
}

Method

setMaxId(maxId)