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/README.md
CHANGED
@@ -64,7 +64,7 @@ node scripts/update_settings.js # update index settings
|
|
64
64
|
|
65
65
|
#### output schema file
|
66
66
|
|
67
|
-
Use this script to pretty-print the
|
67
|
+
Use this script to pretty-print the schema's mappings to stdout.
|
68
68
|
|
69
69
|
```bash
|
70
70
|
node scripts/output_mapping.js
|
package/configValidation.js
CHANGED
@@ -16,7 +16,6 @@ module.exports.tests.functional = function(test, common){
|
|
16
16
|
suite.action( function( done ){
|
17
17
|
suite.client.index({
|
18
18
|
index: suite.props.index,
|
19
|
-
type: config.schema.typeName,
|
20
19
|
id: '1', body: { address_parts: {
|
21
20
|
name: 'Mapzen HQ',
|
22
21
|
number: 30,
|
@@ -29,7 +28,6 @@ module.exports.tests.functional = function(test, common){
|
|
29
28
|
suite.action( function( done ){
|
30
29
|
suite.client.index({
|
31
30
|
index: suite.props.index,
|
32
|
-
type: config.schema.typeName,
|
33
31
|
id: '2', body: { address_parts: {
|
34
32
|
name: 'Fake Venue',
|
35
33
|
number: 300,
|
@@ -42,7 +40,6 @@ module.exports.tests.functional = function(test, common){
|
|
42
40
|
suite.action( function( done ){
|
43
41
|
suite.client.index({
|
44
42
|
index: suite.props.index,
|
45
|
-
type: config.schema.typeName,
|
46
43
|
id: '3', body: { address_parts: {
|
47
44
|
name: 'Mock British Address',
|
48
45
|
number: 3000,
|
@@ -55,7 +52,6 @@ module.exports.tests.functional = function(test, common){
|
|
55
52
|
suite.action( function( done ){
|
56
53
|
suite.client.index({
|
57
54
|
index: suite.props.index,
|
58
|
-
type: config.schema.typeName,
|
59
55
|
id: '4', body: { address_parts: {
|
60
56
|
name: 'Mystery Location',
|
61
57
|
number: 300,
|
@@ -69,7 +65,6 @@ module.exports.tests.functional = function(test, common){
|
|
69
65
|
suite.assert( function( done ){
|
70
66
|
suite.client.search({
|
71
67
|
index: suite.props.index,
|
72
|
-
type: config.schema.typeName,
|
73
68
|
body: { query: { bool: { must: [
|
74
69
|
{ match: { 'address_parts.number': 30 } }
|
75
70
|
]}}}
|
@@ -84,7 +79,6 @@ module.exports.tests.functional = function(test, common){
|
|
84
79
|
suite.assert( function( done ){
|
85
80
|
suite.client.search({
|
86
81
|
index: suite.props.index,
|
87
|
-
type: config.schema.typeName,
|
88
82
|
body: { query: { bool: { must: [
|
89
83
|
{ match_phrase: { 'address_parts.street': 'west 26th street' } }
|
90
84
|
]}}}
|
@@ -99,7 +93,6 @@ module.exports.tests.functional = function(test, common){
|
|
99
93
|
suite.assert( function( done ){
|
100
94
|
suite.client.search({
|
101
95
|
index: suite.props.index,
|
102
|
-
type: config.schema.typeName,
|
103
96
|
body: { query: { bool: { must: [
|
104
97
|
{ match_phrase: { 'address_parts.street': 'W 26th ST' } }
|
105
98
|
]}}}
|
@@ -114,7 +107,6 @@ module.exports.tests.functional = function(test, common){
|
|
114
107
|
suite.assert( function( done ){
|
115
108
|
suite.client.search({
|
116
109
|
index: suite.props.index,
|
117
|
-
type: config.schema.typeName,
|
118
110
|
body: { query: { bool: { must: [
|
119
111
|
{ match: { 'address_parts.zip': '10010' } }
|
120
112
|
]}}}
|
@@ -129,7 +121,6 @@ module.exports.tests.functional = function(test, common){
|
|
129
121
|
suite.assert( function( done ){
|
130
122
|
suite.client.search({
|
131
123
|
index: suite.props.index,
|
132
|
-
type: config.schema.typeName,
|
133
124
|
body: { query: { bool: { must: [
|
134
125
|
{ match: { 'address_parts.zip': 'e24dn' } }
|
135
126
|
]}}}
|
@@ -144,7 +135,6 @@ module.exports.tests.functional = function(test, common){
|
|
144
135
|
suite.assert( function( done ){
|
145
136
|
suite.client.search({
|
146
137
|
index: suite.props.index,
|
147
|
-
type: config.schema.typeName,
|
148
138
|
body: { query: { bool: { must: [
|
149
139
|
{ match: { 'address_parts.zip': '100-10' } }
|
150
140
|
]}}}
|
@@ -159,7 +149,6 @@ module.exports.tests.functional = function(test, common){
|
|
159
149
|
suite.assert( function( done ){
|
160
150
|
suite.client.search({
|
161
151
|
index: suite.props.index,
|
162
|
-
type: config.schema.typeName,
|
163
152
|
body: { query: { bool: { must: [
|
164
153
|
{ match: { 'address_parts.zip': '10 0 10' } }
|
165
154
|
]}}}
|
@@ -174,7 +163,6 @@ module.exports.tests.functional = function(test, common){
|
|
174
163
|
suite.assert( function( done ){
|
175
164
|
suite.client.search({
|
176
165
|
index: suite.props.index,
|
177
|
-
type: config.schema.typeName,
|
178
166
|
body: { query: { bool: { must: [
|
179
167
|
{ match: { 'address_parts.zip': 'E2-4DN' } }
|
180
168
|
]}}}
|
@@ -189,7 +177,6 @@ module.exports.tests.functional = function(test, common){
|
|
189
177
|
suite.assert( function( done ){
|
190
178
|
suite.client.search({
|
191
179
|
index: suite.props.index,
|
192
|
-
type: config.schema.typeName,
|
193
180
|
body: { query: { bool: { must: [
|
194
181
|
{ match: { 'address_parts.zip': 'E2 4DN' } }
|
195
182
|
]}}}
|
@@ -224,7 +211,6 @@ module.exports.tests.venue_vs_address = function(test, common){
|
|
224
211
|
suite.action( function( done ){
|
225
212
|
suite.client.index({
|
226
213
|
index: suite.props.index,
|
227
|
-
type: config.schema.typeName,
|
228
214
|
id: '1', body: {
|
229
215
|
name: { default: 'Union Square' },
|
230
216
|
phrase: { default: 'Union Square' }
|
@@ -239,7 +225,6 @@ module.exports.tests.venue_vs_address = function(test, common){
|
|
239
225
|
let id = i + 100; // id offset
|
240
226
|
suite.client.index({
|
241
227
|
index: suite.props.index,
|
242
|
-
type: config.schema.typeName,
|
243
228
|
id: String(id),
|
244
229
|
body: {
|
245
230
|
name: { default: `${id} Union Square` },
|
@@ -263,7 +248,6 @@ module.exports.tests.venue_vs_address = function(test, common){
|
|
263
248
|
suite.assert( function( done ){
|
264
249
|
suite.client.search({
|
265
250
|
index: suite.props.index,
|
266
|
-
type: config.schema.typeName,
|
267
251
|
searchType: 'dfs_query_then_fetch',
|
268
252
|
size: TOTAL_ADDRESS_DOCS+1,
|
269
253
|
body: {
|
@@ -19,7 +19,6 @@ module.exports.tests.synonyms = function (test, common) {
|
|
19
19
|
suite.action(done => {
|
20
20
|
suite.client.index({
|
21
21
|
index: suite.props.index,
|
22
|
-
type: config.schema.typeName,
|
23
22
|
id: '1',
|
24
23
|
body: {
|
25
24
|
parent: {
|
@@ -33,7 +32,6 @@ module.exports.tests.synonyms = function (test, common) {
|
|
33
32
|
suite.action(done => {
|
34
33
|
suite.client.index({
|
35
34
|
index: suite.props.index,
|
36
|
-
type: config.schema.typeName,
|
37
35
|
id: '2',
|
38
36
|
body: {
|
39
37
|
parent: {
|
@@ -47,7 +45,6 @@ module.exports.tests.synonyms = function (test, common) {
|
|
47
45
|
suite.assert(done => {
|
48
46
|
suite.client.search({
|
49
47
|
index: suite.props.index,
|
50
|
-
type: config.schema.typeName,
|
51
48
|
searchType: 'dfs_query_then_fetch',
|
52
49
|
body: {
|
53
50
|
query: {
|
@@ -70,7 +67,6 @@ module.exports.tests.synonyms = function (test, common) {
|
|
70
67
|
suite.assert(done => {
|
71
68
|
suite.client.search({
|
72
69
|
index: suite.props.index,
|
73
|
-
type: config.schema.typeName,
|
74
70
|
searchType: 'dfs_query_then_fetch',
|
75
71
|
body: {
|
76
72
|
query: {
|
@@ -93,7 +89,6 @@ module.exports.tests.synonyms = function (test, common) {
|
|
93
89
|
suite.assert(done => {
|
94
90
|
suite.client.search({
|
95
91
|
index: suite.props.index,
|
96
|
-
type: config.schema.typeName,
|
97
92
|
searchType: 'dfs_query_then_fetch',
|
98
93
|
body: {
|
99
94
|
query: {
|
@@ -116,7 +111,6 @@ module.exports.tests.synonyms = function (test, common) {
|
|
116
111
|
suite.assert(done => {
|
117
112
|
suite.client.search({
|
118
113
|
index: suite.props.index,
|
119
|
-
type: config.schema.typeName,
|
120
114
|
searchType: 'dfs_query_then_fetch',
|
121
115
|
body: {
|
122
116
|
query: {
|
@@ -147,7 +141,6 @@ module.exports.tests.synonyms = function (test, common) {
|
|
147
141
|
suite.action(done => {
|
148
142
|
suite.client.index({
|
149
143
|
index: suite.props.index,
|
150
|
-
type: config.schema.typeName,
|
151
144
|
id: '1',
|
152
145
|
body: {
|
153
146
|
parent: {
|
@@ -161,7 +154,6 @@ module.exports.tests.synonyms = function (test, common) {
|
|
161
154
|
suite.action(done => {
|
162
155
|
suite.client.index({
|
163
156
|
index: suite.props.index,
|
164
|
-
type: config.schema.typeName,
|
165
157
|
id: '2',
|
166
158
|
body: {
|
167
159
|
parent: {
|
@@ -175,7 +167,6 @@ module.exports.tests.synonyms = function (test, common) {
|
|
175
167
|
suite.assert(done => {
|
176
168
|
suite.client.search({
|
177
169
|
index: suite.props.index,
|
178
|
-
type: config.schema.typeName,
|
179
170
|
searchType: 'dfs_query_then_fetch',
|
180
171
|
body: {
|
181
172
|
query: {
|
@@ -198,7 +189,6 @@ module.exports.tests.synonyms = function (test, common) {
|
|
198
189
|
suite.assert(done => {
|
199
190
|
suite.client.search({
|
200
191
|
index: suite.props.index,
|
201
|
-
type: config.schema.typeName,
|
202
192
|
searchType: 'dfs_query_then_fetch',
|
203
193
|
body: {
|
204
194
|
query: {
|
@@ -221,7 +211,6 @@ module.exports.tests.synonyms = function (test, common) {
|
|
221
211
|
suite.assert(done => {
|
222
212
|
suite.client.search({
|
223
213
|
index: suite.props.index,
|
224
|
-
type: config.schema.typeName,
|
225
214
|
searchType: 'dfs_query_then_fetch',
|
226
215
|
body: {
|
227
216
|
query: {
|
@@ -244,7 +233,6 @@ module.exports.tests.synonyms = function (test, common) {
|
|
244
233
|
suite.assert(done => {
|
245
234
|
suite.client.search({
|
246
235
|
index: suite.props.index,
|
247
|
-
type: config.schema.typeName,
|
248
236
|
searchType: 'dfs_query_then_fetch',
|
249
237
|
body: {
|
250
238
|
query: {
|
@@ -275,7 +263,6 @@ module.exports.tests.synonyms = function (test, common) {
|
|
275
263
|
suite.action(done => {
|
276
264
|
suite.client.index({
|
277
265
|
index: suite.props.index,
|
278
|
-
type: config.schema.typeName,
|
279
266
|
id: '1',
|
280
267
|
body: {
|
281
268
|
parent: {
|
@@ -289,7 +276,6 @@ module.exports.tests.synonyms = function (test, common) {
|
|
289
276
|
suite.action(done => {
|
290
277
|
suite.client.index({
|
291
278
|
index: suite.props.index,
|
292
|
-
type: config.schema.typeName,
|
293
279
|
id: '2',
|
294
280
|
body: {
|
295
281
|
parent: {
|
@@ -303,7 +289,6 @@ module.exports.tests.synonyms = function (test, common) {
|
|
303
289
|
suite.assert(done => {
|
304
290
|
suite.client.search({
|
305
291
|
index: suite.props.index,
|
306
|
-
type: config.schema.typeName,
|
307
292
|
searchType: 'dfs_query_then_fetch',
|
308
293
|
body: {
|
309
294
|
query: {
|
@@ -16,7 +16,6 @@ module.exports.tests.functional = function(test, common){
|
|
16
16
|
suite.action( function( done ){
|
17
17
|
suite.client.index({
|
18
18
|
index: suite.props.index,
|
19
|
-
type: config.schema.typeName,
|
20
19
|
id: '1', body: {
|
21
20
|
parent: {
|
22
21
|
country: 'Test Country',
|
@@ -46,7 +45,6 @@ module.exports.tests.functional = function(test, common){
|
|
46
45
|
suite.assert( function( done ){
|
47
46
|
suite.client.search({
|
48
47
|
index: suite.props.index,
|
49
|
-
type: config.schema.typeName,
|
50
48
|
body: { query: { match: { 'parent.country': 'Test Country' } } }
|
51
49
|
}, function( err, res ){
|
52
50
|
t.equal( err, undefined );
|
@@ -59,7 +57,6 @@ module.exports.tests.functional = function(test, common){
|
|
59
57
|
suite.assert( function( done ){
|
60
58
|
suite.client.search({
|
61
59
|
index: suite.props.index,
|
62
|
-
type: config.schema.typeName,
|
63
60
|
body: { query: { match: { 'parent.country_a': 'TestCountry' } } }
|
64
61
|
}, function( err, res ){
|
65
62
|
t.equal( err, undefined );
|
@@ -72,7 +69,6 @@ module.exports.tests.functional = function(test, common){
|
|
72
69
|
suite.assert( function( done ){
|
73
70
|
suite.client.search({
|
74
71
|
index: suite.props.index,
|
75
|
-
type: config.schema.typeName,
|
76
72
|
body: { query: { match: { 'parent.country_id': '100' } } }
|
77
73
|
}, function( err, res ){
|
78
74
|
t.equal( err, undefined );
|
@@ -47,7 +47,8 @@ module.exports.tests.analyze = function(test, common){
|
|
47
47
|
// remove punctuation (handled by the char_filter)
|
48
48
|
assertAnalysis( 'punctuation', punctuation.all.join(''), ['0:&', '0:and', '0:und'] );
|
49
49
|
assertAnalysis( 'punctuation', 'Hawai‘i', ['hawaii'] );
|
50
|
-
|
50
|
+
assertAnalysis( 'punctuation - « in between', '«res»pub«lika»', ['respublika'] );
|
51
|
+
|
51
52
|
assertAnalysis( 'british_american_english', 'town theatre', ['0:town', '1:theatre', '1:theater'] );
|
52
53
|
assertAnalysis( 'british_american_english', 'town theater', ['0:town', '1:theater', '1:theatre'] );
|
53
54
|
|
@@ -161,7 +162,6 @@ module.exports.tests.slop_query = function(test, common){
|
|
161
162
|
suite.action( function( done ){
|
162
163
|
suite.client.index({
|
163
164
|
index: suite.props.index,
|
164
|
-
type: config.schema.typeName,
|
165
165
|
id: '1',
|
166
166
|
body: { name: { default: 'Lake Cayuga' }, phrase: { default: 'Lake Cayuga' } }
|
167
167
|
}, done );
|
@@ -171,7 +171,6 @@ module.exports.tests.slop_query = function(test, common){
|
|
171
171
|
suite.action( function( done ){
|
172
172
|
suite.client.index({
|
173
173
|
index: suite.props.index,
|
174
|
-
type: config.schema.typeName,
|
175
174
|
id: '2',
|
176
175
|
body: { name: { default: 'Cayuga Lake' }, phrase: { default: 'Cayuga Lake' } }
|
177
176
|
}, done );
|
@@ -181,7 +180,6 @@ module.exports.tests.slop_query = function(test, common){
|
|
181
180
|
suite.action( function( done ){
|
182
181
|
suite.client.index({
|
183
182
|
index: suite.props.index,
|
184
|
-
type: config.schema.typeName,
|
185
183
|
id: '3',
|
186
184
|
body: { name: { default: '7991 Lake Cayuga Dr' }, phrase: { default: '7991 Lake Cayuga Dr' } }
|
187
185
|
}, done );
|
@@ -256,7 +254,6 @@ module.exports.tests.slop = function(test, common){
|
|
256
254
|
suite.action( function( done ){
|
257
255
|
suite.client.index({
|
258
256
|
index: suite.props.index,
|
259
|
-
type: config.schema.typeName,
|
260
257
|
id: '1',
|
261
258
|
body: { name: { default: '52 Görlitzer Straße' } }
|
262
259
|
}, done);
|
@@ -269,7 +266,6 @@ module.exports.tests.slop = function(test, common){
|
|
269
266
|
suite.assert( function( done ){
|
270
267
|
suite.client.search({
|
271
268
|
index: suite.props.index,
|
272
|
-
type: config.schema.typeName,
|
273
269
|
searchType: 'dfs_query_then_fetch',
|
274
270
|
body: { query: { match_phrase: {
|
275
271
|
'name.default': {
|
@@ -21,7 +21,6 @@ module.exports.tests.index_expanded_form_search_contracted = function(test, comm
|
|
21
21
|
suite.action( function( done ){
|
22
22
|
suite.client.index({
|
23
23
|
index: suite.props.index,
|
24
|
-
type: config.schema.typeName,
|
25
24
|
id: '1',
|
26
25
|
body: { name: { default: 'Grolmanstraße' } }
|
27
26
|
}, done);
|
@@ -31,7 +30,6 @@ module.exports.tests.index_expanded_form_search_contracted = function(test, comm
|
|
31
30
|
suite.assert( function( done ){
|
32
31
|
suite.client.search({
|
33
32
|
index: suite.props.index,
|
34
|
-
type: config.schema.typeName,
|
35
33
|
body: { query: { match: {
|
36
34
|
'name.default': {
|
37
35
|
'analyzer': 'peliasQuery',
|
@@ -62,7 +60,6 @@ module.exports.tests.index_expanded_form_search_contracted = function(test, comm
|
|
62
60
|
// suite.action( function( done ){
|
63
61
|
// suite.client.index({
|
64
62
|
// index: suite.props.index,
|
65
|
-
// type: config.schema.typeName,
|
66
63
|
// id: '1',
|
67
64
|
// body: { name: { default: 'Grolmanstr.' } }
|
68
65
|
// }, done);
|
@@ -75,7 +72,6 @@ module.exports.tests.index_expanded_form_search_contracted = function(test, comm
|
|
75
72
|
// suite.assert( function( done ){
|
76
73
|
// suite.client.search({
|
77
74
|
// index: suite.props.index,
|
78
|
-
// type: config.schema.typeName,
|
79
75
|
// body: { query: { match: {
|
80
76
|
// 'name.default': {
|
81
77
|
// 'analyzer': 'peliasQueryPartialToken',
|
@@ -96,7 +92,6 @@ module.exports.tests.index_expanded_form_search_contracted = function(test, comm
|
|
96
92
|
// suite.assert( function( done ){
|
97
93
|
// suite.client.search({
|
98
94
|
// index: suite.props.index,
|
99
|
-
// type: config.schema.typeName,
|
100
95
|
// body: { query: { match: {
|
101
96
|
// 'name.default': {
|
102
97
|
// 'analyzer': 'peliasQuery',
|
@@ -21,7 +21,6 @@ module.exports.tests.index_and_retrieve_expanded_form = function(test, common){
|
|
21
21
|
suite.action( function( done ){
|
22
22
|
suite.client.index({
|
23
23
|
index: suite.props.index,
|
24
|
-
type: config.schema.typeName,
|
25
24
|
id: '1',
|
26
25
|
body: { name: { default: 'north' } }
|
27
26
|
}, done);
|
@@ -31,7 +30,6 @@ module.exports.tests.index_and_retrieve_expanded_form = function(test, common){
|
|
31
30
|
suite.assert( function( done ){
|
32
31
|
suite.client.search({
|
33
32
|
index: suite.props.index,
|
34
|
-
type: config.schema.typeName,
|
35
33
|
body: { query: { match: {
|
36
34
|
'name.default': {
|
37
35
|
'analyzer': 'peliasQuery',
|
@@ -49,7 +47,6 @@ module.exports.tests.index_and_retrieve_expanded_form = function(test, common){
|
|
49
47
|
suite.assert( function( done ){
|
50
48
|
suite.client.search({
|
51
49
|
index: suite.props.index,
|
52
|
-
type: config.schema.typeName,
|
53
50
|
body: { query: { match: {
|
54
51
|
'name.default': {
|
55
52
|
'analyzer': 'peliasQuery',
|
@@ -78,7 +75,6 @@ module.exports.tests.index_and_retrieve_contracted_form = function(test, common)
|
|
78
75
|
suite.action( function( done ){
|
79
76
|
suite.client.index({
|
80
77
|
index: suite.props.index,
|
81
|
-
type: config.schema.typeName,
|
82
78
|
id: '1',
|
83
79
|
body: { name: { default: 'n' } }
|
84
80
|
}, done);
|
@@ -88,7 +84,6 @@ module.exports.tests.index_and_retrieve_contracted_form = function(test, common)
|
|
88
84
|
suite.assert( function( done ){
|
89
85
|
suite.client.search({
|
90
86
|
index: suite.props.index,
|
91
|
-
type: config.schema.typeName,
|
92
87
|
body: { query: { match: {
|
93
88
|
'name.default': {
|
94
89
|
'analyzer': 'peliasQuery',
|
@@ -117,7 +112,6 @@ module.exports.tests.index_and_retrieve_mixed_form_1 = function(test, common){
|
|
117
112
|
suite.action( function( done ){
|
118
113
|
suite.client.index({
|
119
114
|
index: suite.props.index,
|
120
|
-
type: config.schema.typeName,
|
121
115
|
id: '1',
|
122
116
|
body: { name: { default: 'n' } }
|
123
117
|
}, done);
|
@@ -127,7 +121,6 @@ module.exports.tests.index_and_retrieve_mixed_form_1 = function(test, common){
|
|
127
121
|
suite.assert( function( done ){
|
128
122
|
suite.client.search({
|
129
123
|
index: suite.props.index,
|
130
|
-
type: config.schema.typeName,
|
131
124
|
body: { query: { match: {
|
132
125
|
'name.default': {
|
133
126
|
'analyzer': 'peliasQuery',
|
@@ -145,7 +138,6 @@ module.exports.tests.index_and_retrieve_mixed_form_1 = function(test, common){
|
|
145
138
|
suite.assert( function( done ){
|
146
139
|
suite.client.search({
|
147
140
|
index: suite.props.index,
|
148
|
-
type: config.schema.typeName,
|
149
141
|
body: { query: { match: {
|
150
142
|
'name.default': {
|
151
143
|
'analyzer': 'peliasQuery',
|
@@ -174,7 +166,6 @@ module.exports.tests.index_and_retrieve_mixed_form_2 = function(test, common){
|
|
174
166
|
suite.action( function( done ){
|
175
167
|
suite.client.index({
|
176
168
|
index: suite.props.index,
|
177
|
-
type: config.schema.typeName,
|
178
169
|
id: '1',
|
179
170
|
body: { name: { default: 'north' } }
|
180
171
|
}, done);
|
@@ -184,7 +175,6 @@ module.exports.tests.index_and_retrieve_mixed_form_2 = function(test, common){
|
|
184
175
|
suite.assert( function( done ){
|
185
176
|
suite.client.search({
|
186
177
|
index: suite.props.index,
|
187
|
-
type: config.schema.typeName,
|
188
178
|
body: { query: { match: {
|
189
179
|
'name.default': {
|
190
180
|
'analyzer': 'peliasQuery',
|
@@ -22,7 +22,6 @@ module.exports.tests.index_and_retrieve_expanded_form = function(test, common){
|
|
22
22
|
suite.action( function( done ){
|
23
23
|
suite.client.index({
|
24
24
|
index: suite.props.index,
|
25
|
-
type: config.schema.typeName,
|
26
25
|
id: '1',
|
27
26
|
body: { name: { default: 'center' } }
|
28
27
|
}, done);
|
@@ -32,7 +31,6 @@ module.exports.tests.index_and_retrieve_expanded_form = function(test, common){
|
|
32
31
|
suite.assert( function( done ){
|
33
32
|
suite.client.search({
|
34
33
|
index: suite.props.index,
|
35
|
-
type: config.schema.typeName,
|
36
34
|
body: { query: { match: {
|
37
35
|
'name.default': {
|
38
36
|
'analyzer': 'peliasQuery',
|
@@ -50,7 +48,6 @@ module.exports.tests.index_and_retrieve_expanded_form = function(test, common){
|
|
50
48
|
suite.assert( function( done ){
|
51
49
|
suite.client.search({
|
52
50
|
index: suite.props.index,
|
53
|
-
type: config.schema.typeName,
|
54
51
|
body: { query: { match: {
|
55
52
|
'name.default': {
|
56
53
|
'analyzer': 'peliasQuery',
|
@@ -79,7 +76,6 @@ module.exports.tests.index_and_retrieve_contracted_form = function(test, common)
|
|
79
76
|
suite.action( function( done ){
|
80
77
|
suite.client.index({
|
81
78
|
index: suite.props.index,
|
82
|
-
type: config.schema.typeName,
|
83
79
|
id: '1',
|
84
80
|
body: { name: { default: 'ctr' } }
|
85
81
|
}, done);
|
@@ -89,7 +85,6 @@ module.exports.tests.index_and_retrieve_contracted_form = function(test, common)
|
|
89
85
|
suite.assert( function( done ){
|
90
86
|
suite.client.search({
|
91
87
|
index: suite.props.index,
|
92
|
-
type: config.schema.typeName,
|
93
88
|
body: { query: { match: {
|
94
89
|
'name.default': {
|
95
90
|
'analyzer': 'peliasQuery',
|
@@ -118,7 +113,6 @@ module.exports.tests.index_and_retrieve_mixed_form_1 = function(test, common){
|
|
118
113
|
suite.action( function( done ){
|
119
114
|
suite.client.index({
|
120
115
|
index: suite.props.index,
|
121
|
-
type: config.schema.typeName,
|
122
116
|
id: '1',
|
123
117
|
body: { name: { default: 'ctr' } }
|
124
118
|
}, done);
|
@@ -128,7 +122,6 @@ module.exports.tests.index_and_retrieve_mixed_form_1 = function(test, common){
|
|
128
122
|
suite.assert( function( done ){
|
129
123
|
suite.client.search({
|
130
124
|
index: suite.props.index,
|
131
|
-
type: config.schema.typeName,
|
132
125
|
body: { query: { match: {
|
133
126
|
'name.default': {
|
134
127
|
'analyzer': 'peliasQuery',
|
@@ -146,7 +139,6 @@ module.exports.tests.index_and_retrieve_mixed_form_1 = function(test, common){
|
|
146
139
|
suite.assert( function( done ){
|
147
140
|
suite.client.search({
|
148
141
|
index: suite.props.index,
|
149
|
-
type: config.schema.typeName,
|
150
142
|
body: { query: { match: {
|
151
143
|
'name.default': {
|
152
144
|
'analyzer': 'peliasQuery',
|
@@ -175,7 +167,6 @@ module.exports.tests.index_and_retrieve_mixed_form_2 = function(test, common){
|
|
175
167
|
suite.action( function( done ){
|
176
168
|
suite.client.index({
|
177
169
|
index: suite.props.index,
|
178
|
-
type: config.schema.typeName,
|
179
170
|
id: '1',
|
180
171
|
body: { name: { default: 'center' } }
|
181
172
|
}, done);
|
@@ -185,7 +176,6 @@ module.exports.tests.index_and_retrieve_mixed_form_2 = function(test, common){
|
|
185
176
|
suite.assert( function( done ){
|
186
177
|
suite.client.search({
|
187
178
|
index: suite.props.index,
|
188
|
-
type: config.schema.typeName,
|
189
179
|
body: { query: { match: {
|
190
180
|
'name.default': {
|
191
181
|
'analyzer': 'peliasQuery',
|
@@ -15,7 +15,6 @@ module.exports.tests.index_and_retrieve = function(test, common){
|
|
15
15
|
suite.action( function( done ){
|
16
16
|
suite.client.index({
|
17
17
|
index: suite.props.index,
|
18
|
-
type: config.schema.typeName,
|
19
18
|
id: '1',
|
20
19
|
body: {
|
21
20
|
bounding_box: '{"min_lat":-47.75,"max_lat":-33.9,"min_lon":163.82,"max_lon":179.42}'
|
@@ -28,7 +27,6 @@ module.exports.tests.index_and_retrieve = function(test, common){
|
|
28
27
|
suite.client.get(
|
29
28
|
{
|
30
29
|
index: suite.props.index,
|
31
|
-
type: config.schema.typeName,
|
32
30
|
id: '1'
|
33
31
|
},
|
34
32
|
function (err, res) {
|
@@ -32,13 +32,11 @@ function nameAssertion( analyzer, common ){
|
|
32
32
|
return function(t){
|
33
33
|
|
34
34
|
var suite = new Suite( common.clientOpts, common.create );
|
35
|
-
const _type = config.schema.typeName;
|
36
35
|
|
37
36
|
// index a document from a normal document layer
|
38
37
|
suite.action( done => {
|
39
38
|
suite.client.index({
|
40
39
|
index: suite.props.index,
|
41
|
-
type: _type,
|
42
40
|
id: '1',
|
43
41
|
body: { name: { default: 'foo', alt: 'bar' } }
|
44
42
|
}, done );
|
@@ -50,7 +48,6 @@ function nameAssertion( analyzer, common ){
|
|
50
48
|
|
51
49
|
suite.client.indices.getMapping({
|
52
50
|
index: suite.props.index,
|
53
|
-
include_type_name: false
|
54
51
|
}, (err, res) => {
|
55
52
|
|
56
53
|
const properties = res[suite.props.index].mappings.properties;
|
@@ -71,13 +68,11 @@ function phraseAssertion( analyzer, common ){
|
|
71
68
|
return function(t){
|
72
69
|
|
73
70
|
const suite = new Suite( common.clientOpts, common.create );
|
74
|
-
const _type = config.schema.typeName;
|
75
71
|
|
76
72
|
// index a document from a normal document layer
|
77
73
|
suite.action( done => {
|
78
74
|
suite.client.index({
|
79
75
|
index: suite.props.index,
|
80
|
-
type: _type,
|
81
76
|
id: '1',
|
82
77
|
body: { phrase: { default: 'foo', alt: 'bar' } }
|
83
78
|
}, done );
|
@@ -89,7 +84,6 @@ function phraseAssertion( analyzer, common ){
|
|
89
84
|
|
90
85
|
suite.client.indices.getMapping({
|
91
86
|
index: suite.props.index,
|
92
|
-
include_type_name: false
|
93
87
|
}, ( err, res ) => {
|
94
88
|
|
95
89
|
const properties = res[suite.props.index].mappings.properties;
|
@@ -110,13 +104,11 @@ function addendumAssertion( namespace, value, common ){
|
|
110
104
|
return function(t){
|
111
105
|
|
112
106
|
const suite = new Suite( common.clientOpts, common.create );
|
113
|
-
const _type = config.schema.typeName;
|
114
107
|
|
115
108
|
// index a document including the addendum
|
116
109
|
suite.action( done => {
|
117
110
|
suite.client.index({
|
118
111
|
index: suite.props.index,
|
119
|
-
type: _type,
|
120
112
|
id: '1',
|
121
113
|
body: { addendum: { [namespace]: value } },
|
122
114
|
}, done );
|
@@ -127,7 +119,6 @@ function addendumAssertion( namespace, value, common ){
|
|
127
119
|
suite.assert( done => {
|
128
120
|
suite.client.indices.getMapping({
|
129
121
|
index: suite.props.index,
|
130
|
-
include_type_name: false,
|
131
122
|
}, ( err, res ) => {
|
132
123
|
|
133
124
|
const properties = res[suite.props.index].mappings.properties;
|
@@ -156,7 +147,6 @@ function addendumAssertion( namespace, value, common ){
|
|
156
147
|
suite.assert( done => {
|
157
148
|
suite.client.get({
|
158
149
|
index: suite.props.index,
|
159
|
-
type: _type,
|
160
150
|
id: 1
|
161
151
|
}, ( err, res ) => {
|
162
152
|
t.false( err );
|