Skip to content

Commit 62cd3fe

Browse files
authored
Merge pull request #1713 from pelias/prefer-country-dedupe
Prefer country over locality when deduping
2 parents ccaad33 + e935d6a commit 62cd3fe

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

helper/diffPlaces.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const codec = require('pelias-model').codec;
1010
// when performing inter-layer deduping, layers coming earlier in this list take
1111
// preference to those appearing later.
1212
const layerPreferences = [
13-
'locality',
1413
'country',
14+
'locality',
1515
'localadmin',
1616
'county',
1717
'region',

test/unit/middleware/dedupe.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ module.exports.tests.priority = function(test, common) {
519519
var expectedCount = 1;
520520
dedupe(req, res, function () {
521521
t.equal(res.data.length, expectedCount, 'results have fewer items than before');
522-
t.deepEqual(res.data[0].layer, 'locality', 'locality result won');
522+
t.deepEqual(res.data[0].layer, 'country', 'country result won');
523523
t.end();
524524
});
525525
});

0 commit comments

Comments
 (0)