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.
@@ -15,28 +15,28 @@ module.exports.tests.source_filter = function(test, common){
15
15
  // index some docs
16
16
  suite.action( function( done ){
17
17
  suite.client.index({
18
- index: suite.props.index, type: config.schema.typeName,
18
+ index: suite.props.index,
19
19
  id: '1', body: { source: 'osm', layer: 'node', source_id: 'dataset/1' }
20
20
  }, done );
21
21
  });
22
22
 
23
23
  suite.action( function( done ){
24
24
  suite.client.index({
25
- index: suite.props.index, type: config.schema.typeName,
25
+ index: suite.props.index,
26
26
  id: '2', body: { source: 'osm', layer: 'address', source_id: 'dataset/2' }
27
27
  }, done );
28
28
  });
29
29
 
30
30
  suite.action( function( done ){
31
31
  suite.client.index({
32
- index: suite.props.index, type: config.schema.typeName,
32
+ index: suite.props.index,
33
33
  id: '3', body: { source: 'geonames', layer: 'address', source_id: 'dataset/1' }
34
34
  }, done );
35
35
  });
36
36
 
37
37
  suite.action( function( done ){
38
38
  suite.client.index({
39
- index: suite.props.index, type: config.schema.typeName,
39
+ index: suite.props.index,
40
40
  id: '4', body: { source: 'foo bar baz' }
41
41
  }, done );
42
42
  });
@@ -45,7 +45,6 @@ module.exports.tests.source_filter = function(test, common){
45
45
  suite.assert( function( done ){
46
46
  suite.client.search({
47
47
  index: suite.props.index,
48
- type: config.schema.typeName,
49
48
  body: { query: {
50
49
  term: {
51
50
  source: 'osm'
@@ -61,7 +60,6 @@ module.exports.tests.source_filter = function(test, common){
61
60
  suite.assert( function( done ){
62
61
  suite.client.search({
63
62
  index: suite.props.index,
64
- type: config.schema.typeName,
65
63
  body: { query: {
66
64
  term: {
67
65
  layer: 'address'
@@ -77,7 +75,6 @@ module.exports.tests.source_filter = function(test, common){
77
75
  suite.assert( function( done ){
78
76
  suite.client.search({
79
77
  index: suite.props.index,
80
- type: config.schema.typeName,
81
78
  body: { query: {
82
79
  term: {
83
80
  source_id: 'dataset/1'
@@ -93,7 +90,6 @@ module.exports.tests.source_filter = function(test, common){
93
90
  suite.assert( function( done ){
94
91
  suite.client.search({
95
92
  index: suite.props.index,
96
- type: config.schema.typeName,
97
93
  body: { query: { bool: { must: [
98
94
  { term: { source: 'osm' } },
99
95
  { term: { source_id: 'dataset/1' } }
@@ -108,7 +104,6 @@ module.exports.tests.source_filter = function(test, common){
108
104
  suite.assert( function( done ){
109
105
  suite.client.search({
110
106
  index: suite.props.index,
111
- type: config.schema.typeName,
112
107
  body: { query: {
113
108
  term: {
114
109
  source: 'OSM'
@@ -124,7 +119,6 @@ module.exports.tests.source_filter = function(test, common){
124
119
  suite.assert( function( done ){
125
120
  suite.client.search({
126
121
  index: suite.props.index,
127
- type: config.schema.typeName,
128
122
  body: { query: {
129
123
  term: {
130
124
  source: 'foo'
@@ -140,7 +134,6 @@ module.exports.tests.source_filter = function(test, common){
140
134
  suite.assert( function( done ){
141
135
  suite.client.search({
142
136
  index: suite.props.index,
143
- type: config.schema.typeName,
144
137
  body: { query: {
145
138
  term: {
146
139
  source: 'foo bar baz'
@@ -8,8 +8,7 @@
8
8
  "type": "text",
9
9
  "analyzer": "peliasIndexOneEdgeGram",
10
10
  "search_analyzer": "peliasAdmin",
11
- "similarity": "peliasDefaultSimilarity",
12
- "doc_values": false
11
+ "similarity": "peliasDefaultSimilarity"
13
12
  }
14
13
  }
15
14
  }
@@ -8,8 +8,7 @@
8
8
  "type": "text",
9
9
  "analyzer": "peliasIndexCountryAbbreviationOneEdgeGram",
10
10
  "search_analyzer": "peliasQuery",
11
- "similarity": "peliasDefaultSimilarity",
12
- "doc_values": false
11
+ "similarity": "peliasDefaultSimilarity"
13
12
  }
14
13
  }
15
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pelias-schema",
3
- "version": "6.8.0",
3
+ "version": "7.1.0",
4
4
  "author": "pelias",
5
5
  "description": "Elasticsearch schema files and tooling for Pelias",
6
6
  "homepage": "https://github.com/pelias/schema",
@@ -11,7 +11,6 @@
11
11
  "integration": "./bin/integration",
12
12
  "create_index": "./bin/create_index",
13
13
  "drop_index": "node scripts/drop_index",
14
- "reset_type": "node scripts/reset_type",
15
14
  "update_settings": "node scripts/update_settings"
16
15
  },
17
16
  "repository": {
@@ -34,7 +33,7 @@
34
33
  "elasticsearch": "^16.0.0",
35
34
  "glob": "^7.1.6",
36
35
  "lodash": "^4.17.15",
37
- "pelias-config": "^4.5.0",
36
+ "pelias-config": "^6.0.0",
38
37
  "pelias-logger": "^1.3.0",
39
38
  "semver": "^7.1.1"
40
39
  },
package/punctuation.js CHANGED
@@ -1,23 +1,18 @@
1
1
  // These characters will be removed from ngrams/shingles
2
2
  // @see: org/apache/lucene/analysis/cn/smart/stopwords.txt
3
3
 
4
- module.exports.all = [
5
- ".","`","‘","-","_","=","?","'","|","\"","(",")","{","}","[","]","<",">","*",
6
- "#","&","^","$","@","!","~",":",";","+","《","》","—","-",",","。",
7
- "、", ":",";","!","·","?","„","“","”",")","(","【","】","[","]","●"
4
+ const all = [
5
+ ".","`","‘","’","‛","-","_","=","?","'","|","\"","(",")","{","}","[","]","<",">","*",
6
+ "#","&","^","$","@","!","~",":",";","+","《","》","—","-",",","。","‹","›","⹂","〝","〞",
7
+ "、", ":",";","!","·","?","„","“","”","‟",")","(","【","】","[","]","●","«","»"
8
8
  ];
9
9
 
10
- module.exports.allowed = [
10
+ const allowed = [
11
11
  "-", // allow hypens
12
12
  "&" // allow ampersands
13
13
  ];
14
14
 
15
- module.exports.blacklist = module.exports.all.slice();
16
-
17
15
  // remove alowed chars from blacklist
18
- module.exports.allowed.forEach(function(item){
19
- var index = module.exports.blacklist.indexOf(item);
20
- if( index > -1 ){
21
- module.exports.blacklist.splice(index, 1);
22
- }
23
- });
16
+ const blacklist = all.filter(s => !allowed.includes(s));
17
+
18
+ module.exports = { all, allowed, blacklist };
@@ -10,15 +10,6 @@ const required = ['analysis-icu'];
10
10
  // list of failures
11
11
  let failures = [];
12
12
 
13
- // returns the appropriate plugin name for the configured Elasticsearch version
14
- function elasticsearchPluginUtility() {
15
- if (config.esclient.apiVersion === '2.4') {
16
- return 'plugin';
17
- } else {
18
- return 'elasticsearch-plugin';
19
- }
20
- }
21
-
22
13
  cli.header("checking elasticsearch plugins");
23
14
  client.nodes.info(null, (err, res) => {
24
15
 
@@ -76,7 +67,7 @@ client.nodes.info(null, (err, res) => {
76
67
  failures.forEach(failure => {
77
68
  console.error( `\nyou can install the missing packages on '${failure.node.name}' [${failure.node.ip}] with the following command(s):\n` );
78
69
  failure.plugins.forEach(plugin => {
79
- console.error( colors.green( `sudo ${failure.node.settings.path.home}/bin/${elasticsearchPluginUtility()} install ${plugin}`) );
70
+ console.error( colors.green( `sudo ${failure.node.settings.path.home}/bin/elasticsearch-plugin install ${plugin}`) );
80
71
  });
81
72
  });
82
73
  console.error( colors.white("\nnote:") + "some plugins may require you to restart elasticsearch.\n");
@@ -30,7 +30,6 @@ const indexName = config.schema.indexName;
30
30
  const req = {
31
31
  index: indexName,
32
32
  body: schema,
33
- include_type_name: false
34
33
  };
35
34
 
36
35
  client.indices.create(req, (err, res) => {
@@ -1,7 +1,6 @@
1
1
  const _ = require('lodash')
2
2
  const colors = require('colors')
3
3
  const cli = require('./cli');
4
- const config = require('pelias-config').generate();
5
4
  const schema = require('../schema');
6
5
  const DEFAULT_ANALYZER = 'standard';
7
6
  const NOT_APPLICABLE_ANALYZER = 'n/a';
@@ -54,7 +53,7 @@ const error = function(vals) {
54
53
  }
55
54
 
56
55
  // parse mapping
57
- const mapping = schema.mappings[config.schema.typeName];
56
+ const mapping = schema.mappings;
58
57
  const dynamic = mapping.dynamic_templates.map(t => _.first(_.map(t, v => v)));
59
58
 
60
59
  // process and single mapping property (recursively)
@@ -1,21 +1,4 @@
1
- var config = require('pelias-config').generate();
2
- var es = require('elasticsearch');
3
- var client = new es.Client(config.esclient);
4
1
  var schema = require('../schema');
5
2
 
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
- // print out mapping for just one type
10
- if ( _type ) {
11
- var mapping = schema.mappings[_type];
12
- if( !mapping ){
13
- console.error( 'could not find a mapping in the schema file for', _index+'/'+_type );
14
- process.exit(1);
15
- }
16
- console.log( JSON.stringify( mapping, null, 2 ) );
17
- //print out the entire schema mapping
18
- } else {
19
- console.log( JSON.stringify( schema, null, 2 ) );
20
- }
3
+ console.log( JSON.stringify( schema.mappings, null, 2 ) );
21
4
 
package/settings.js CHANGED
@@ -226,7 +226,7 @@ function generate(){
226
226
  "only_on_same_position": "true"
227
227
  },
228
228
  "peliasOneEdgeGramFilter": {
229
- "type" : "edgeNGram",
229
+ "type" : "edge_ngram",
230
230
  "min_gram" : 1,
231
231
  "max_gram" : 24
232
232
  },
@@ -19,7 +19,7 @@ module.exports.tests.interface = function(test, common) {
19
19
 
20
20
  test('config without schema.indexName should throw error', function(t) {
21
21
  var config = {
22
- schema: { typeName: 'example_type' },
22
+ schema: {},
23
23
  esclient: {}
24
24
  };
25
25
 
@@ -30,25 +30,11 @@ module.exports.tests.interface = function(test, common) {
30
30
 
31
31
  });
32
32
 
33
- test('config without schema.typeName should throw error', function (t) {
34
- var config = {
35
- schema: { indexName: 'example_index' },
36
- esclient: {}
37
- };
38
-
39
- t.throws(function () {
40
- configValidation.validate(config);
41
- }, /"schema.typeName" is required/, 'schema.typeName should exist');
42
- t.end();
43
-
44
- });
45
-
46
33
  test('config with non-string schema.indexName should throw error', function(t) {
47
34
  [null, 17, {}, [], false].forEach((value) => {
48
35
  var config = {
49
36
  schema: {
50
37
  indexName: value,
51
- typeName: 'example_type'
52
38
  },
53
39
  esclient: {}
54
40
  };
@@ -63,32 +49,11 @@ module.exports.tests.interface = function(test, common) {
63
49
 
64
50
  });
65
51
 
66
- test('config with non-string schema.typeName should throw error', function (t) {
67
- [null, 17, {}, [], false].forEach((value) => {
68
- var config = {
69
- schema: {
70
- indexName: 'example_index',
71
- typeName: value
72
- },
73
- esclient: {}
74
- };
75
-
76
- t.throws(function () {
77
- configValidation.validate(config);
78
- }, /"schema.typeName" must be a string/, 'schema.typeName should be a string');
79
-
80
- });
81
-
82
- t.end();
83
-
84
- });
85
-
86
52
  test('config with non-object esclient should throw error', function(t) {
87
53
  [null, 17, [], 'string', true].forEach((value) => {
88
54
  var config = {
89
55
  schema: {
90
56
  indexName: 'example_index',
91
- typeName: 'example_type'
92
57
  },
93
58
  esclient: value
94
59
  };
@@ -107,7 +72,6 @@ module.exports.tests.interface = function(test, common) {
107
72
  var config = {
108
73
  schema: {
109
74
  indexName: 'example_index',
110
- typeName: 'example_type'
111
75
  },
112
76
  esclient: {}
113
77
  };
@@ -248,7 +248,7 @@
248
248
  "only_on_same_position": "true"
249
249
  },
250
250
  "peliasOneEdgeGramFilter": {
251
- "type": "edgeNGram",
251
+ "type": "edge_ngram",
252
252
  "min_gram": 1,
253
253
  "max_gram": 24
254
254
  },
@@ -2277,6 +2277,8 @@
2277
2277
  ".=>",
2278
2278
  "`=>",
2279
2279
  "‘=>",
2280
+ "’=>",
2281
+ "‛=>",
2280
2282
  "_=>",
2281
2283
  "==>",
2282
2284
  "?=>",
@@ -2307,6 +2309,11 @@
2307
2309
  "-=>",
2308
2310
  ",=>",
2309
2311
  "。=>",
2312
+ "‹=>",
2313
+ "›=>",
2314
+ "⹂=>",
2315
+ "〝=>",
2316
+ "〞=>",
2310
2317
  "、=>",
2311
2318
  ":=>",
2312
2319
  ";=>",
@@ -2316,13 +2323,16 @@
2316
2323
  "„=>",
2317
2324
  "“=>",
2318
2325
  "”=>",
2326
+ "‟=>",
2319
2327
  ")=>",
2320
2328
  "(=>",
2321
2329
  "【=>",
2322
2330
  "】=>",
2323
2331
  "[=>",
2324
2332
  "]=>",
2325
- "●=>"
2333
+ "●=>",
2334
+ "«=>",
2335
+ "»=>"
2326
2336
  ]
2327
2337
  },
2328
2338
  "alphanumeric": {
@@ -2415,8 +2425,7 @@
2415
2425
  "type": "text",
2416
2426
  "analyzer": "peliasIndexOneEdgeGram",
2417
2427
  "search_analyzer": "peliasAdmin",
2418
- "similarity": "peliasDefaultSimilarity",
2419
- "doc_values": false
2428
+ "similarity": "peliasDefaultSimilarity"
2420
2429
  }
2421
2430
  }
2422
2431
  },
@@ -2430,8 +2439,7 @@
2430
2439
  "type": "text",
2431
2440
  "analyzer": "peliasIndexOneEdgeGram",
2432
2441
  "search_analyzer": "peliasAdmin",
2433
- "similarity": "peliasDefaultSimilarity",
2434
- "doc_values": false
2442
+ "similarity": "peliasDefaultSimilarity"
2435
2443
  }
2436
2444
  }
2437
2445
  },
@@ -2453,8 +2461,7 @@
2453
2461
  "type": "text",
2454
2462
  "analyzer": "peliasIndexOneEdgeGram",
2455
2463
  "search_analyzer": "peliasAdmin",
2456
- "similarity": "peliasDefaultSimilarity",
2457
- "doc_values": false
2464
+ "similarity": "peliasDefaultSimilarity"
2458
2465
  }
2459
2466
  }
2460
2467
  },
@@ -2468,8 +2475,7 @@
2468
2475
  "type": "text",
2469
2476
  "analyzer": "peliasIndexOneEdgeGram",
2470
2477
  "search_analyzer": "peliasAdmin",
2471
- "similarity": "peliasDefaultSimilarity",
2472
- "doc_values": false
2478
+ "similarity": "peliasDefaultSimilarity"
2473
2479
  }
2474
2480
  }
2475
2481
  },
@@ -2491,8 +2497,7 @@
2491
2497
  "type": "text",
2492
2498
  "analyzer": "peliasIndexOneEdgeGram",
2493
2499
  "search_analyzer": "peliasAdmin",
2494
- "similarity": "peliasDefaultSimilarity",
2495
- "doc_values": false
2500
+ "similarity": "peliasDefaultSimilarity"
2496
2501
  }
2497
2502
  }
2498
2503
  },
@@ -2506,8 +2511,7 @@
2506
2511
  "type": "text",
2507
2512
  "analyzer": "peliasIndexOneEdgeGram",
2508
2513
  "search_analyzer": "peliasAdmin",
2509
- "similarity": "peliasDefaultSimilarity",
2510
- "doc_values": false
2514
+ "similarity": "peliasDefaultSimilarity"
2511
2515
  }
2512
2516
  }
2513
2517
  },
@@ -2529,8 +2533,7 @@
2529
2533
  "type": "text",
2530
2534
  "analyzer": "peliasIndexOneEdgeGram",
2531
2535
  "search_analyzer": "peliasAdmin",
2532
- "similarity": "peliasDefaultSimilarity",
2533
- "doc_values": false
2536
+ "similarity": "peliasDefaultSimilarity"
2534
2537
  }
2535
2538
  }
2536
2539
  },
@@ -2544,8 +2547,7 @@
2544
2547
  "type": "text",
2545
2548
  "analyzer": "peliasIndexCountryAbbreviationOneEdgeGram",
2546
2549
  "search_analyzer": "peliasQuery",
2547
- "similarity": "peliasDefaultSimilarity",
2548
- "doc_values": false
2550
+ "similarity": "peliasDefaultSimilarity"
2549
2551
  }
2550
2552
  }
2551
2553
  },
@@ -2567,8 +2569,7 @@
2567
2569
  "type": "text",
2568
2570
  "analyzer": "peliasIndexOneEdgeGram",
2569
2571
  "search_analyzer": "peliasAdmin",
2570
- "similarity": "peliasDefaultSimilarity",
2571
- "doc_values": false
2572
+ "similarity": "peliasDefaultSimilarity"
2572
2573
  }
2573
2574
  }
2574
2575
  },
@@ -2582,8 +2583,7 @@
2582
2583
  "type": "text",
2583
2584
  "analyzer": "peliasIndexOneEdgeGram",
2584
2585
  "search_analyzer": "peliasAdmin",
2585
- "similarity": "peliasDefaultSimilarity",
2586
- "doc_values": false
2586
+ "similarity": "peliasDefaultSimilarity"
2587
2587
  }
2588
2588
  }
2589
2589
  },
@@ -2605,8 +2605,7 @@
2605
2605
  "type": "text",
2606
2606
  "analyzer": "peliasIndexOneEdgeGram",
2607
2607
  "search_analyzer": "peliasAdmin",
2608
- "similarity": "peliasDefaultSimilarity",
2609
- "doc_values": false
2608
+ "similarity": "peliasDefaultSimilarity"
2610
2609
  }
2611
2610
  }
2612
2611
  },
@@ -2620,8 +2619,7 @@
2620
2619
  "type": "text",
2621
2620
  "analyzer": "peliasIndexOneEdgeGram",
2622
2621
  "search_analyzer": "peliasAdmin",
2623
- "similarity": "peliasDefaultSimilarity",
2624
- "doc_values": false
2622
+ "similarity": "peliasDefaultSimilarity"
2625
2623
  }
2626
2624
  }
2627
2625
  },
@@ -2643,8 +2641,7 @@
2643
2641
  "type": "text",
2644
2642
  "analyzer": "peliasIndexOneEdgeGram",
2645
2643
  "search_analyzer": "peliasAdmin",
2646
- "similarity": "peliasDefaultSimilarity",
2647
- "doc_values": false
2644
+ "similarity": "peliasDefaultSimilarity"
2648
2645
  }
2649
2646
  }
2650
2647
  },
@@ -2658,8 +2655,7 @@
2658
2655
  "type": "text",
2659
2656
  "analyzer": "peliasIndexOneEdgeGram",
2660
2657
  "search_analyzer": "peliasAdmin",
2661
- "similarity": "peliasDefaultSimilarity",
2662
- "doc_values": false
2658
+ "similarity": "peliasDefaultSimilarity"
2663
2659
  }
2664
2660
  }
2665
2661
  },
@@ -2681,8 +2677,7 @@
2681
2677
  "type": "text",
2682
2678
  "analyzer": "peliasIndexOneEdgeGram",
2683
2679
  "search_analyzer": "peliasAdmin",
2684
- "similarity": "peliasDefaultSimilarity",
2685
- "doc_values": false
2680
+ "similarity": "peliasDefaultSimilarity"
2686
2681
  }
2687
2682
  }
2688
2683
  },
@@ -2696,8 +2691,7 @@
2696
2691
  "type": "text",
2697
2692
  "analyzer": "peliasIndexOneEdgeGram",
2698
2693
  "search_analyzer": "peliasAdmin",
2699
- "similarity": "peliasDefaultSimilarity",
2700
- "doc_values": false
2694
+ "similarity": "peliasDefaultSimilarity"
2701
2695
  }
2702
2696
  }
2703
2697
  },
@@ -2719,8 +2713,7 @@
2719
2713
  "type": "text",
2720
2714
  "analyzer": "peliasIndexOneEdgeGram",
2721
2715
  "search_analyzer": "peliasAdmin",
2722
- "similarity": "peliasDefaultSimilarity",
2723
- "doc_values": false
2716
+ "similarity": "peliasDefaultSimilarity"
2724
2717
  }
2725
2718
  }
2726
2719
  },
@@ -2734,8 +2727,7 @@
2734
2727
  "type": "text",
2735
2728
  "analyzer": "peliasIndexOneEdgeGram",
2736
2729
  "search_analyzer": "peliasAdmin",
2737
- "similarity": "peliasDefaultSimilarity",
2738
- "doc_values": false
2730
+ "similarity": "peliasDefaultSimilarity"
2739
2731
  }
2740
2732
  }
2741
2733
  },
@@ -2757,8 +2749,7 @@
2757
2749
  "type": "text",
2758
2750
  "analyzer": "peliasIndexOneEdgeGram",
2759
2751
  "search_analyzer": "peliasAdmin",
2760
- "similarity": "peliasDefaultSimilarity",
2761
- "doc_values": false
2752
+ "similarity": "peliasDefaultSimilarity"
2762
2753
  }
2763
2754
  }
2764
2755
  },
@@ -2772,8 +2763,7 @@
2772
2763
  "type": "text",
2773
2764
  "analyzer": "peliasIndexOneEdgeGram",
2774
2765
  "search_analyzer": "peliasAdmin",
2775
- "similarity": "peliasDefaultSimilarity",
2776
- "doc_values": false
2766
+ "similarity": "peliasDefaultSimilarity"
2777
2767
  }
2778
2768
  }
2779
2769
  },
@@ -2795,8 +2785,7 @@
2795
2785
  "type": "text",
2796
2786
  "analyzer": "peliasIndexOneEdgeGram",
2797
2787
  "search_analyzer": "peliasAdmin",
2798
- "similarity": "peliasDefaultSimilarity",
2799
- "doc_values": false
2788
+ "similarity": "peliasDefaultSimilarity"
2800
2789
  }
2801
2790
  }
2802
2791
  },
@@ -2810,8 +2799,7 @@
2810
2799
  "type": "text",
2811
2800
  "analyzer": "peliasIndexOneEdgeGram",
2812
2801
  "search_analyzer": "peliasAdmin",
2813
- "similarity": "peliasDefaultSimilarity",
2814
- "doc_values": false
2802
+ "similarity": "peliasDefaultSimilarity"
2815
2803
  }
2816
2804
  }
2817
2805
  },
@@ -2833,8 +2821,7 @@
2833
2821
  "type": "text",
2834
2822
  "analyzer": "peliasIndexOneEdgeGram",
2835
2823
  "search_analyzer": "peliasAdmin",
2836
- "similarity": "peliasDefaultSimilarity",
2837
- "doc_values": false
2824
+ "similarity": "peliasDefaultSimilarity"
2838
2825
  }
2839
2826
  }
2840
2827
  },
@@ -2848,8 +2835,7 @@
2848
2835
  "type": "text",
2849
2836
  "analyzer": "peliasIndexOneEdgeGram",
2850
2837
  "search_analyzer": "peliasAdmin",
2851
- "similarity": "peliasDefaultSimilarity",
2852
- "doc_values": false
2838
+ "similarity": "peliasDefaultSimilarity"
2853
2839
  }
2854
2840
  }
2855
2841
  },
@@ -2871,8 +2857,7 @@
2871
2857
  "type": "text",
2872
2858
  "analyzer": "peliasIndexOneEdgeGram",
2873
2859
  "search_analyzer": "peliasAdmin",
2874
- "similarity": "peliasDefaultSimilarity",
2875
- "doc_values": false
2860
+ "similarity": "peliasDefaultSimilarity"
2876
2861
  }
2877
2862
  }
2878
2863
  },
@@ -2886,8 +2871,7 @@
2886
2871
  "type": "text",
2887
2872
  "analyzer": "peliasIndexOneEdgeGram",
2888
2873
  "search_analyzer": "peliasAdmin",
2889
- "similarity": "peliasDefaultSimilarity",
2890
- "doc_values": false
2874
+ "similarity": "peliasDefaultSimilarity"
2891
2875
  }
2892
2876
  }
2893
2877
  },
@@ -2909,8 +2893,7 @@
2909
2893
  "type": "text",
2910
2894
  "analyzer": "peliasIndexOneEdgeGram",
2911
2895
  "search_analyzer": "peliasAdmin",
2912
- "similarity": "peliasDefaultSimilarity",
2913
- "doc_values": false
2896
+ "similarity": "peliasDefaultSimilarity"
2914
2897
  }
2915
2898
  }
2916
2899
  },
@@ -2924,8 +2907,7 @@
2924
2907
  "type": "text",
2925
2908
  "analyzer": "peliasIndexOneEdgeGram",
2926
2909
  "search_analyzer": "peliasAdmin",
2927
- "similarity": "peliasDefaultSimilarity",
2928
- "doc_values": false
2910
+ "similarity": "peliasDefaultSimilarity"
2929
2911
  }
2930
2912
  }
2931
2913
  },
@@ -3051,4 +3033,4 @@
3051
3033
  },
3052
3034
  "dynamic": "strict"
3053
3035
  }
3054
- }
3036
+ }
package/test/settings.js CHANGED
@@ -490,7 +490,7 @@ module.exports.tests.peliasOneEdgeGramFilter = function(test, common) {
490
490
  var s = settings();
491
491
  t.equal(typeof s.analysis.filter.peliasOneEdgeGramFilter, 'object', 'there is a peliasIndexOneEdgeGram filter');
492
492
  var filter = s.analysis.filter.peliasOneEdgeGramFilter;
493
- t.equal(filter.type, 'edgeNGram');
493
+ t.equal(filter.type, 'edge_ngram');
494
494
  t.equal(filter.min_gram, 1);
495
495
  t.equal(filter.max_gram, 24);
496
496
  t.end();
@@ -591,7 +591,7 @@ module.exports.tests.punctuationCharFilter = function(test, common) {
591
591
  var char_filter = s.analysis.char_filter.punctuation;
592
592
  t.equal(char_filter.type, 'mapping');
593
593
  t.true(Array.isArray(char_filter.mappings));
594
- t.equal(char_filter.mappings.length, 49);
594
+ t.equal(char_filter.mappings.length, 59);
595
595
  t.end();
596
596
  });
597
597
  };