diff --git a/test/ciao/search/address_parsing.coffee b/test/ciao/search/address_parsing.coffee index e39f484e..ab98e83e 100644 --- a/test/ciao/search/address_parsing.coffee +++ b/test/ciao/search/address_parsing.coffee @@ -38,4 +38,7 @@ json.geocoding.query.parsed_text['number'].should.eql '30' json.geocoding.query.parsed_text['street'].should.eql 'w 26th st' json.geocoding.query.parsed_text['state'].should.eql 'NY' json.geocoding.query.parsed_text['regions'].should.eql [] -json.geocoding.query.parsed_text['admin_parts'].should.eql "ny" \ No newline at end of file +json.geocoding.query.parsed_text['admin_parts'].should.eql "ny" + +json.features[0].properties.confidence.should.eql 1 +json.features[0].properties.match_type.should.eql "exact" \ No newline at end of file diff --git a/test/ciao_test_data.js b/test/ciao_test_data.js index da1e9821..55872f67 100644 --- a/test/ciao_test_data.js +++ b/test/ciao_test_data.js @@ -48,6 +48,86 @@ types.forEach( function( type, i1 ){ }); }); +client.index( + { + index: config.indexName, + type: 'address', + id: 'way:265038872', + body: { + 'center_point': { + 'lon': -73.990425, + 'lat': 40.744131 + }, + 'parent': { + 'country': [ + 'United States' + ], + 'neighbourhood_id': [ + '85869245' + ], + 'country_a': [ + 'USA' + ], + 'locality_a': [ + null + ], + 'region_id': [ + '85688543' + ], + 'county': [ + 'New York County' + ], + 'borough_a': [ + null + ], + 'borough_id': [ + '421205771' + ], + 'locality': [ + 'New York' + ], + 'borough': [ + 'Manhattan' + ], + 'region_a': [ + 'NY' + ], + 'county_id': [ + '102081863' + ], + 'locality_id': [ + '85977539' + ], + 'neighbourhood_a': [ + null + ], + 'neighbourhood': [ + 'Flatiron District' + ], + 'region': [ + 'New York' + ], + 'country_id': [ + '85633793' + ], + 'county_a': [ + null + ] + }, + 'name': {'default': '30 West 26th Street'}, + 'address_parts': { + 'zip': '10010', + 'number': '30', + 'street': 'West 26th Street' + }, + 'alpha3': 'USA', + 'source': 'openstreetmap', + 'source_id': 'way:265038872', + 'layer': 'address' + } + } +); + // call refresh so the index merges the changes actions.push( function( done ){ client.indices.refresh( { index: config.indexName }, done);