Skip to content

Commit

Permalink
feat(cross_street): add cross_street to address_parts
Browse files Browse the repository at this point in the history
  • Loading branch information
missinglink committed Jan 30, 2019
1 parent 72ec124 commit b3b5478
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 2 deletions.
6 changes: 5 additions & 1 deletion mappings/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,14 @@ var schema = {
type: 'string',
analyzer: 'peliasStreet',
},
cross_street: {
type: 'string',
analyzer: 'peliasStreet',
},
zip: {
type: 'string',
analyzer: 'peliasZip',
}
},
}
},

Expand Down
2 changes: 1 addition & 1 deletion test/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports.tests.fields = function(test, common) {

// should contain the correct address field definitions
module.exports.tests.address_fields = function(test, common) {
var fields = ['name','unit','number','street','zip'];
var fields = ['name','unit','number','street','cross_street','zip'];
test('address fields specified', function(t) {
t.deepEqual(Object.keys(schema.properties.address_parts.properties), fields);
t.end();
Expand Down
60 changes: 60 additions & 0 deletions test/fixtures/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,10 @@
"type": "string",
"analyzer": "peliasStreet"
},
"cross_street": {
"type": "string",
"analyzer": "peliasStreet"
},
"zip": {
"type": "string",
"analyzer": "peliasZip"
Expand Down Expand Up @@ -1045,6 +1049,10 @@
"type": "string",
"analyzer": "peliasStreet"
},
"cross_street": {
"type": "string",
"analyzer": "peliasStreet"
},
"zip": {
"type": "string",
"analyzer": "peliasZip"
Expand Down Expand Up @@ -1378,6 +1386,10 @@
"type": "string",
"analyzer": "peliasStreet"
},
"cross_street": {
"type": "string",
"analyzer": "peliasStreet"
},
"zip": {
"type": "string",
"analyzer": "peliasZip"
Expand Down Expand Up @@ -1711,6 +1723,10 @@
"type": "string",
"analyzer": "peliasStreet"
},
"cross_street": {
"type": "string",
"analyzer": "peliasStreet"
},
"zip": {
"type": "string",
"analyzer": "peliasZip"
Expand Down Expand Up @@ -2044,6 +2060,10 @@
"type": "string",
"analyzer": "peliasStreet"
},
"cross_street": {
"type": "string",
"analyzer": "peliasStreet"
},
"zip": {
"type": "string",
"analyzer": "peliasZip"
Expand Down Expand Up @@ -2377,6 +2397,10 @@
"type": "string",
"analyzer": "peliasStreet"
},
"cross_street": {
"type": "string",
"analyzer": "peliasStreet"
},
"zip": {
"type": "string",
"analyzer": "peliasZip"
Expand Down Expand Up @@ -2710,6 +2734,10 @@
"type": "string",
"analyzer": "peliasStreet"
},
"cross_street": {
"type": "string",
"analyzer": "peliasStreet"
},
"zip": {
"type": "string",
"analyzer": "peliasZip"
Expand Down Expand Up @@ -3043,6 +3071,10 @@
"type": "string",
"analyzer": "peliasStreet"
},
"cross_street": {
"type": "string",
"analyzer": "peliasStreet"
},
"zip": {
"type": "string",
"analyzer": "peliasZip"
Expand Down Expand Up @@ -3376,6 +3408,10 @@
"type": "string",
"analyzer": "peliasStreet"
},
"cross_street": {
"type": "string",
"analyzer": "peliasStreet"
},
"zip": {
"type": "string",
"analyzer": "peliasZip"
Expand Down Expand Up @@ -3709,6 +3745,10 @@
"type": "string",
"analyzer": "peliasStreet"
},
"cross_street": {
"type": "string",
"analyzer": "peliasStreet"
},
"zip": {
"type": "string",
"analyzer": "peliasZip"
Expand Down Expand Up @@ -4042,6 +4082,10 @@
"type": "string",
"analyzer": "peliasStreet"
},
"cross_street": {
"type": "string",
"analyzer": "peliasStreet"
},
"zip": {
"type": "string",
"analyzer": "peliasZip"
Expand Down Expand Up @@ -4375,6 +4419,10 @@
"type": "string",
"analyzer": "peliasStreet"
},
"cross_street": {
"type": "string",
"analyzer": "peliasStreet"
},
"zip": {
"type": "string",
"analyzer": "peliasZip"
Expand Down Expand Up @@ -4708,6 +4756,10 @@
"type": "string",
"analyzer": "peliasStreet"
},
"cross_street": {
"type": "string",
"analyzer": "peliasStreet"
},
"zip": {
"type": "string",
"analyzer": "peliasZip"
Expand Down Expand Up @@ -5041,6 +5093,10 @@
"type": "string",
"analyzer": "peliasStreet"
},
"cross_street": {
"type": "string",
"analyzer": "peliasStreet"
},
"zip": {
"type": "string",
"analyzer": "peliasZip"
Expand Down Expand Up @@ -5374,6 +5430,10 @@
"type": "string",
"analyzer": "peliasStreet"
},
"cross_street": {
"type": "string",
"analyzer": "peliasStreet"
},
"zip": {
"type": "string",
"analyzer": "peliasZip"
Expand Down

0 comments on commit b3b5478

Please sign in to comment.