From f14061fc9ebd3ec9a7f125063447aad23d3c627b Mon Sep 17 00:00:00 2001 From: missinglink Date: Thu, 3 Sep 2020 09:46:08 +0200 Subject: [PATCH] fix(synonyms): "custom_street" synonyms should be applied to name.* and phrase.* indices --- settings.js | 6 ++++++ test/fixtures/expected.json | 6 ++++++ test/settings.js | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/settings.js b/settings.js index fe214673..6231c169 100644 --- a/settings.js +++ b/settings.js @@ -51,6 +51,8 @@ function generate(){ "lowercase", "trim", "synonyms/custom_name/multiword", + "synonyms/custom_street/multiword", + "synonyms/custom_admin/multiword", "name_synonyms_multiplexer", "icu_folding", "remove_ordinals", @@ -84,6 +86,8 @@ function generate(){ "trim", "remove_duplicate_spaces", "synonyms/custom_name/multiword", + "synonyms/custom_street/multiword", + "synonyms/custom_admin/multiword", "name_synonyms_multiplexer", "icu_folding", "remove_ordinals", @@ -156,6 +160,8 @@ function generate(){ "preserve_original": false, "filters": [ "synonyms/custom_name", + "synonyms/custom_street", + "synonyms/custom_admin", "synonyms/personal_titles", "synonyms/place_names", "synonyms/streets", diff --git a/test/fixtures/expected.json b/test/fixtures/expected.json index 16a586c0..a8da612e 100644 --- a/test/fixtures/expected.json +++ b/test/fixtures/expected.json @@ -50,6 +50,8 @@ "lowercase", "trim", "synonyms/custom_name/multiword", + "synonyms/custom_street/multiword", + "synonyms/custom_admin/multiword", "name_synonyms_multiplexer", "icu_folding", "remove_ordinals", @@ -89,6 +91,8 @@ "trim", "remove_duplicate_spaces", "synonyms/custom_name/multiword", + "synonyms/custom_street/multiword", + "synonyms/custom_admin/multiword", "name_synonyms_multiplexer", "icu_folding", "remove_ordinals", @@ -172,6 +176,8 @@ "preserve_original": false, "filters": [ "synonyms/custom_name", + "synonyms/custom_street", + "synonyms/custom_admin", "synonyms/personal_titles", "synonyms/place_names", "synonyms/streets", diff --git a/test/settings.js b/test/settings.js index 26d7272d..1f2b395b 100644 --- a/test/settings.js +++ b/test/settings.js @@ -105,6 +105,8 @@ module.exports.tests.nameSynonymsMultiplexerFilter = function (test, common) { t.equal(filter.type, 'multiplexer'); t.deepEqual(filter.filters, [ 'synonyms/custom_name', + 'synonyms/custom_street', + 'synonyms/custom_admin', 'synonyms/personal_titles', 'synonyms/place_names', 'synonyms/streets', @@ -132,6 +134,8 @@ module.exports.tests.peliasIndexOneEdgeGramAnalyzer = function(test, common) { "lowercase", "trim", "synonyms/custom_name/multiword", + "synonyms/custom_street/multiword", + "synonyms/custom_admin/multiword", "name_synonyms_multiplexer", "icu_folding", "remove_ordinals", @@ -189,6 +193,8 @@ module.exports.tests.peliasPhraseAnalyzer = function(test, common) { "trim", "remove_duplicate_spaces", "synonyms/custom_name/multiword", + "synonyms/custom_street/multiword", + "synonyms/custom_admin/multiword", "name_synonyms_multiplexer", "icu_folding", "remove_ordinals",