diff --git a/src/components/extractFields.js b/src/components/extractFields.js index 7692f735..4865d8b2 100644 --- a/src/components/extractFields.js +++ b/src/components/extractFields.js @@ -22,12 +22,11 @@ const population_hierarchy = [ // note the '%s' is replaced by a language code const NAME_ALIAS_FIELDS = [ 'name:%s_x_preferred', - 'name:%s_x_variant', 'label:%s_x_preferred_longname', 'label:%s_x_preferred' ]; -const WOF_NAMES_REGEX = /^(name|label):[a-z]{3}_x_(preferred|variant)$/; +const WOF_NAMES_REGEX = /^(name|label):[a-z]{3}_x_preferred$/; // this function is used to verify that a US county QS altname is available function isUsCounty(base_record, wof_country, qs_a2_alt) { diff --git a/test/components/extractFieldsTest.js b/test/components/extractFieldsTest.js index 2128f652..3ca6aea1 100644 --- a/test/components/extractFieldsTest.js +++ b/test/components/extractFieldsTest.js @@ -948,7 +948,7 @@ tape('name alias tests', (test) => { } }]; - const expected_name_aliases = ['preferred1', 'preferred2', 'variant1', 'variant2', 'englabel1', 'englabel2']; + const expected_name_aliases = ['preferred1', 'preferred2', 'englabel1', 'englabel2']; test_stream(input, extractFields.create(), function (err, actual) { t.deepEqual(actual[0].name_aliases, expected_name_aliases, 'name aliases populated from preferred and variant fields'); @@ -974,7 +974,6 @@ tape('name alias tests', (test) => { const expected_name_aliases = [ 'preferred1', 'preferred2', - 'variant1', 'variant2', 'spalabel1', 'spalabel2', 'fralabel1', 'fralabel2', 'englabel1', 'englabel2' @@ -1003,12 +1002,11 @@ tape('multi-lang index test', (test) => { const expected_name_langs = { 'en': ['preferredENG1'], - 'fr': ['preferredFRA1', 'preferredFRA2'], - 'es': ['variantSPA1', 'variantSPA2'] + 'fr': ['preferredFRA1', 'preferredFRA2'] }; test_stream(input, extractFields.create(), function (err, actual) { - t.deepEqual(actual[0].name_langs, expected_name_langs, 'name langs populated from fr preferred and SPA variant fields'); + t.deepEqual(actual[0].name_langs, expected_name_langs, 'name langs populated from fr preferred fields'); t.end(); }); });