From b3b547845b2f2acb79fe41a14b408f582f7986d3 Mon Sep 17 00:00:00 2001 From: missinglink Date: Wed, 30 Jan 2019 18:44:33 +1300 Subject: [PATCH] feat(cross_street): add cross_street to address_parts --- mappings/document.js | 6 +++- test/document.js | 2 +- test/fixtures/expected.json | 60 +++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 2 deletions(-) diff --git a/mappings/document.js b/mappings/document.js index 7408acc4..60b5ff20 100644 --- a/mappings/document.js +++ b/mappings/document.js @@ -40,10 +40,14 @@ var schema = { type: 'string', analyzer: 'peliasStreet', }, + cross_street: { + type: 'string', + analyzer: 'peliasStreet', + }, zip: { type: 'string', analyzer: 'peliasZip', - } + }, } }, diff --git a/test/document.js b/test/document.js index 99d8489d..7a523e4a 100644 --- a/test/document.js +++ b/test/document.js @@ -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(); diff --git a/test/fixtures/expected.json b/test/fixtures/expected.json index 60c35b67..740c5631 100644 --- a/test/fixtures/expected.json +++ b/test/fixtures/expected.json @@ -712,6 +712,10 @@ "type": "string", "analyzer": "peliasStreet" }, + "cross_street": { + "type": "string", + "analyzer": "peliasStreet" + }, "zip": { "type": "string", "analyzer": "peliasZip" @@ -1045,6 +1049,10 @@ "type": "string", "analyzer": "peliasStreet" }, + "cross_street": { + "type": "string", + "analyzer": "peliasStreet" + }, "zip": { "type": "string", "analyzer": "peliasZip" @@ -1378,6 +1386,10 @@ "type": "string", "analyzer": "peliasStreet" }, + "cross_street": { + "type": "string", + "analyzer": "peliasStreet" + }, "zip": { "type": "string", "analyzer": "peliasZip" @@ -1711,6 +1723,10 @@ "type": "string", "analyzer": "peliasStreet" }, + "cross_street": { + "type": "string", + "analyzer": "peliasStreet" + }, "zip": { "type": "string", "analyzer": "peliasZip" @@ -2044,6 +2060,10 @@ "type": "string", "analyzer": "peliasStreet" }, + "cross_street": { + "type": "string", + "analyzer": "peliasStreet" + }, "zip": { "type": "string", "analyzer": "peliasZip" @@ -2377,6 +2397,10 @@ "type": "string", "analyzer": "peliasStreet" }, + "cross_street": { + "type": "string", + "analyzer": "peliasStreet" + }, "zip": { "type": "string", "analyzer": "peliasZip" @@ -2710,6 +2734,10 @@ "type": "string", "analyzer": "peliasStreet" }, + "cross_street": { + "type": "string", + "analyzer": "peliasStreet" + }, "zip": { "type": "string", "analyzer": "peliasZip" @@ -3043,6 +3071,10 @@ "type": "string", "analyzer": "peliasStreet" }, + "cross_street": { + "type": "string", + "analyzer": "peliasStreet" + }, "zip": { "type": "string", "analyzer": "peliasZip" @@ -3376,6 +3408,10 @@ "type": "string", "analyzer": "peliasStreet" }, + "cross_street": { + "type": "string", + "analyzer": "peliasStreet" + }, "zip": { "type": "string", "analyzer": "peliasZip" @@ -3709,6 +3745,10 @@ "type": "string", "analyzer": "peliasStreet" }, + "cross_street": { + "type": "string", + "analyzer": "peliasStreet" + }, "zip": { "type": "string", "analyzer": "peliasZip" @@ -4042,6 +4082,10 @@ "type": "string", "analyzer": "peliasStreet" }, + "cross_street": { + "type": "string", + "analyzer": "peliasStreet" + }, "zip": { "type": "string", "analyzer": "peliasZip" @@ -4375,6 +4419,10 @@ "type": "string", "analyzer": "peliasStreet" }, + "cross_street": { + "type": "string", + "analyzer": "peliasStreet" + }, "zip": { "type": "string", "analyzer": "peliasZip" @@ -4708,6 +4756,10 @@ "type": "string", "analyzer": "peliasStreet" }, + "cross_street": { + "type": "string", + "analyzer": "peliasStreet" + }, "zip": { "type": "string", "analyzer": "peliasZip" @@ -5041,6 +5093,10 @@ "type": "string", "analyzer": "peliasStreet" }, + "cross_street": { + "type": "string", + "analyzer": "peliasStreet" + }, "zip": { "type": "string", "analyzer": "peliasZip" @@ -5374,6 +5430,10 @@ "type": "string", "analyzer": "peliasStreet" }, + "cross_street": { + "type": "string", + "analyzer": "peliasStreet" + }, "zip": { "type": "string", "analyzer": "peliasZip"