pelias-schema 9.0.0 → 9.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ jobs:
7
7
  matrix:
8
8
  os:
9
9
  - ubuntu-22.04
10
- node-version: [ 20.x, 22.x ]
10
+ node-version: [ 20.x, 22.x, 24.x ]
11
11
  es-version: [7.6.1]
12
12
  icuTokenizer: [true, false]
13
13
  steps:
@@ -7,7 +7,7 @@ jobs:
7
7
  matrix:
8
8
  os:
9
9
  - ubuntu-22.04
10
- node-version: [ 20.x, 22.x ]
10
+ node-version: [ 20.x, 22.x, 24.x ]
11
11
  icuTokenizer: [true, false]
12
12
  steps:
13
13
  - uses: actions/checkout@v4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pelias-schema",
3
- "version": "9.0.0",
3
+ "version": "9.0.1",
4
4
  "author": "pelias",
5
5
  "description": "Elasticsearch schema files and tooling for Pelias",
6
6
  "homepage": "https://github.com/pelias/schema",
@@ -13,7 +13,7 @@ function drop() {
13
13
  const req = { index: config.schema.indexName };
14
14
  client.indices.delete(req, (err, res) => {
15
15
  console.log('\n[delete mapping]', '\t', config.schema.indexName, err || '\t', res);
16
- process.exit(!!err);
16
+ process.exit(err ? 1 : 0);
17
17
  });
18
18
  }
19
19
 
@@ -39,4 +39,4 @@ function fail() {
39
39
 
40
40
  function isForced() {
41
41
  return process.argv.length > 2 && ['--force-yes', '-f'].indexOf(process.argv[2]) > -1;
42
- }
42
+ }
@@ -6,19 +6,19 @@ var schema = require('../schema');
6
6
  var _index = config.schema.indexName;
7
7
 
8
8
  // Error: ElasticsearchIllegalArgumentException[can't change the number of shards for an index
9
- if( schema.settings.hasOwnProperty('index') &&
10
- schema.settings.index.hasOwnProperty('number_of_shards') ){
9
+ if (schema.settings.hasOwnProperty('index') &&
10
+ schema.settings.index.hasOwnProperty('number_of_shards')) {
11
11
  delete schema.settings.index.number_of_shards;
12
12
  delete schema.settings.index.number_of_replicas;
13
13
  }
14
14
 
15
- client.indices.close( { index: _index }, function( err, res ){
16
- console.log( '[close index]', '\t', _index, err || '\t', res );
17
- client.indices.putSettings( { index: _index, body: schema.settings }, function( err, res ){
18
- console.log( '[put settings]', '\t', _index, err || '\t', res );
19
- client.indices.open( { index: _index }, function( err, res ){
20
- console.log( '[open index]', '\t', _index, err || '\t', res );
21
- process.exit( !!err );
15
+ client.indices.close({ index: _index }, function (err, res) {
16
+ console.log('[close index]', '\t', _index, err || '\t', res);
17
+ client.indices.putSettings({ index: _index, body: schema.settings }, function (err, res) {
18
+ console.log('[put settings]', '\t', _index, err || '\t', res);
19
+ client.indices.open({ index: _index }, function (err, res) {
20
+ console.log('[open index]', '\t', _index, err || '\t', res);
21
+ process.exit(err ? 1 : 0);
22
22
  });
23
23
  });
24
24
  });