Browse Source

Update ciao test data script

pull/595/head
Julian Simioni 8 years ago
parent
commit
b7288aca15
No known key found for this signature in database
GPG Key ID: 6DAD08919FDBF563
  1. 5
      test/ciao_test_data.js

5
test/ciao_test_data.js

@ -15,6 +15,7 @@
var client = require('elasticsearch').Client(),
async = require('async'),
actions = [];
var config = require('pelias-config').generate().api;
// add one record per 'type' in order to cause the _default_ mapping
// to be copied when the new type is created.
@ -28,7 +29,7 @@ types.forEach( function( type, i1 ){
layers.forEach( function( layer, i3 ){
actions.push( function( done ){
client.index({
index: 'pelias',
index: config.indexName,
type: type,
id: [i1,i2,i3].join(':'),
body: {
@ -49,7 +50,7 @@ types.forEach( function( type, i1 ){
// call refresh so the index merges the changes
actions.push( function( done ){
client.indices.refresh( { index: 'pelias' }, done);
client.indices.refresh( { index: config.indexName }, done);
});
// perform all actions in series

Loading…
Cancel
Save