esbootstrap
esboostrap will bootstrap, map and load fixtures for an elasticsearch index.
Installation
Add esboostrap in devDependencies
"devDependencies": {
...
"esbootstrap": ">=1.0.0"
},
and run
npm update esbootstrap
Usage
var esbootstrap = require('esbootstrap');
var options = {
elasticsearch: {
host: ...
log: ...
requestTimeout: ...
keepAlive: ..
},
indexName:...,
createRequestBody: {...},
mappingRequestBody: {...},
fixtures: {...}
};
esbootstrap.bootstrap(options, function() {
});
Or if you already have an elasticsearch instance up
and running and want to only load some data:
var options = {
elasticsearch: {
host: ...
log: ...
requestTimeout: ...
keepAlive: ..
},
fixtures: {...}
};
esbootstrap.loadFixtures(options, function() {
});
Tests