healthonnet/hon-lucene-synonyms — pull request #42 by rpialum (2014-06-18 13:59:57+00:00)
Title: Patch 1 Issue 41

Issue #41, when original search term is quoted and synonym being expanded is item quoted don't re-quote when doing constructPhraseQueries. Removes issue where double quotes appear in result. Also when doing constructPhraseQueries, only quote phrases not single term synonyms.

Could not get Python to work on my machine (v3.4.1), and also wasn't quite sure how to verify my results via a python test case. Best way I'm thinking is to set debugQuery=on and then in the response check the 'expandedSynonyms' lists generated to confirm double quotes are not present

Stubbed out test case for issue #41. Additional logic needs to be implemented for testing the results, see TODO. I've been unable to get Python(v3.4.1) to run the top level file, but am assuming that debugQuery needs to be set on and the contents of the 'expandedSynonyms' in the response needs to be analyized. Currently I'm assuming a count of the number of quotes would work, though the exact expected string could also be passed in.