How to use elasticdump - 1 common examples

To help you get started, we’ve selected a few elasticdump examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github elastic / kibana / test / support / utils / elastic_dump.js View on Github external
'input-index':   null,
        output:          myoutput,
        'output-index':  index,
        inputTransport:  null,
        outputTransport: null,
        searchBody:      null,
        sourceOnly:      false,
        jsonLines:       false,
        format:          '',
        'ignore-errors': false,
        scrollTime:      '10m',
        timeout:         null,
        skip:            null,
        toLog:           null,
      };
      const dumper = new Elasticdump(options.input, options.output, options);

      dumper.on('log',   function (message) { Log.debug(message); });
      dumper.on('error', function (error)   { Log.debug('error', 'Error Emitted => ' + (error.message || JSON.stringify(error))); });

      const promise = new Promise(function (resolve, reject) {
        dumper.dump(function (error) {
          if (error) {
            Log.debug('THERE WAS AN ERROR :-(');
            reject(Error(error));
          } else {
            resolve ('elasticdumpModule success');
          }
        });
      });
      return promise;
    },

elasticdump

import and export tools for elasticsearch

Apache-2.0
Latest version published 5 months ago

Package Health Score

83 / 100
Full package analysis

Popular elasticdump functions