From 59bba39e25187dd11342120d629b120d3ef1c5b3 Mon Sep 17 00:00:00 2001 From: kialj876 Date: Wed, 20 Feb 2019 15:28:36 -0800 Subject: [PATCH] 104 fixes (#527) * added stemmed synonym searching to synonym field in ms Signed-off-by: Kial Jinnah * pytest added Signed-off-by: Kial Jinnah * pytest update Signed-off-by: Kial Jinnah --- .../python/end_points/test_synonym_match.py | 17 +++++++++++++++++ .../possible.conflicts/conf/managed-schema | 10 +++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/api/tests/python/end_points/test_synonym_match.py b/api/tests/python/end_points/test_synonym_match.py index 44f6ae4a1..fc0ca910a 100644 --- a/api/tests/python/end_points/test_synonym_match.py +++ b/api/tests/python/end_points/test_synonym_match.py @@ -550,3 +550,20 @@ def test_number_synonyms(client, jwt, app, query, expected_list): seed_database_with(client, jwt, 'FIFTH ZZZZZ', id='1', source='2') verify_synonym_match(client, jwt, query=query, expected_list=expected_list) +@integration_postgres_solr +@integration_synonym_api +@integration_solr +@pytest.mark.parametrize("query, ordered_list", [ + ('PACIFIC WEST CONSTRUCTION', ['----PACIFIC WEST CONSTRUCTION - PROXIMITY SEARCH', + '----PACIFIC WEST CONSTRUCTION* - EXACT WORD ORDER', + '----PACIFIC WEST synonyms:(CONSTRUCT) - PROXIMITY SEARCH', + '----PACIFIC WEST* synonyms:(CONSTRUCT) - EXACT WORD ORDER', + '----PACIFIC synonyms:(CONSTRUCT) - PROXIMITY SEARCH', + 'PACIFIC DEVELOPMENT', + ]), +]) +def test_synonym_clause_stemmed(client, jwt, app, query, ordered_list): + # for loop didn't work for seeding so manual + seed_database_with(client, jwt, 'PACIFIC DEVELOPMENT', id='1', source='2') + verify_order(client, jwt, query=query, expected_order=ordered_list) + diff --git a/solr/cores/possible.conflicts/conf/managed-schema b/solr/cores/possible.conflicts/conf/managed-schema index 45c818ab1..35a5686d1 100644 --- a/solr/cores/possible.conflicts/conf/managed-schema +++ b/solr/cores/possible.conflicts/conf/managed-schema @@ -687,9 +687,7 @@ - - + @@ -697,10 +695,10 @@ + - @@ -851,7 +849,6 @@ ignoreCase="true" words="lang/stopwords_en.txt" /> - @@ -880,7 +877,6 @@ ignoreCase="true" words="lang/stopwords_en.txt" /> -