diff --git a/api/namex/analytics/solr.py b/api/namex/analytics/solr.py index 1368815e5..b81f2fe1d 100644 --- a/api/namex/analytics/solr.py +++ b/api/namex/analytics/solr.py @@ -895,8 +895,8 @@ def word_pre_processing(cls, list_of_words, type, solr_base_url): for text in processed_words['analysis']['field_names']['name']['index'][count]: processed_list.append(text['text']) - stem_in_name = False for item in list_of_words: + stem_in_name = False for processed_synonym in processed_list: if processed_synonym.upper() in item.upper(): stem_in_name = True diff --git a/api/tests/python/end_points/test_synonym_match.py b/api/tests/python/end_points/test_synonym_match.py index 6e8b85399..6c5c0042d 100644 --- a/api/tests/python/end_points/test_synonym_match.py +++ b/api/tests/python/end_points/test_synonym_match.py @@ -513,6 +513,7 @@ def test_order(client, jwt, app, query, ordered_list): ('CONSULTING CONSTRUCTION DEVELOPMENT', ['CONSULT', 'CONSTRUCT', 'DEVELOP']), ('PROPERTY', ['PROPERTY', 'PROPERTI']), ('PROPERTIES', ['PROPERTI']), + ('MANAGEMENT PROPERTY', ['PROPERTY','MANAG','PROPERTI']), ]) def test_stems(client, jwt, app, query, stems): verify_stems(client, jwt, query=query, stems=stems)