pelias-schema 6.8.0 → 7.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/configValidation.js +0 -1
- package/integration/address_matching.js +0 -16
- package/integration/admin_abbreviations.js +0 -15
- package/integration/admin_matching.js +0 -4
- package/integration/analyzer_peliasPhrase.js +2 -6
- package/integration/autocomplete_abbreviated_street_names.js +0 -5
- package/integration/autocomplete_directional_synonym_expansion.js +0 -10
- package/integration/autocomplete_street_synonym_expansion.js +0 -10
- package/integration/bounding_box.js +0 -2
- package/integration/dynamic_templates.js +0 -10
- package/integration/multi_token_synonyms.js +0 -1
- package/integration/run.js +1 -3
- package/integration/source_layer_sourceid_filtering.js +4 -11
- package/mappings/partial/admin.json +1 -2
- package/mappings/partial/countryAbbreviation.json +1 -2
- package/package.json +2 -3
- package/punctuation.js +8 -13
- package/scripts/check_plugins.js +1 -10
- package/scripts/create_index.js +0 -1
- package/scripts/list_analyzers.js +1 -2
- package/scripts/output_mapping.js +1 -18
- package/settings.js +1 -1
- package/test/configValidation.js +1 -37
- package/test/fixtures/expected.json +41 -59
- package/test/settings.js +2 -2
- package/scripts/reset_type.js +0 -26
package/scripts/reset_type.js
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
var config = require('pelias-config').generate().esclient;
|
2
|
-
var es = require('elasticsearch');
|
3
|
-
var client = new es.Client(config);
|
4
|
-
var schema = require('../schema');
|
5
|
-
|
6
|
-
var _index = ( process.argv.length > 3 ) ? process.argv[3] : config.schema.indexName;
|
7
|
-
var _type = ( process.argv.length > 2 ) ? process.argv[2] : null; // get type from cli args
|
8
|
-
|
9
|
-
if( !_type ){
|
10
|
-
console.error( 'you must provide the target es \'type\' as the first cli argument' );
|
11
|
-
process.exit(1);
|
12
|
-
}
|
13
|
-
|
14
|
-
var mapping = schema.mappings[_type];
|
15
|
-
if( !mapping ){
|
16
|
-
console.error( 'could not find a mapping in the schema file for', _index+'/'+_type );
|
17
|
-
process.exit(1);
|
18
|
-
}
|
19
|
-
|
20
|
-
client.indices.deleteMapping( { index: _index, type: _type }, function( err, res ){
|
21
|
-
console.log( '[delete mapping]', '\t', _index+'/'+_type, err || '\t', res );
|
22
|
-
client.indices.putMapping( { index: _index, type: _type, body:mapping }, function( err, res ){
|
23
|
-
console.log( '[put mapping]', '\t\t', _index+'/'+_type, err || '\t', res );
|
24
|
-
process.exit( !!err );
|
25
|
-
});
|
26
|
-
});
|