Details
-
Bug
-
Status: Closed
-
TBD
-
Resolution: Fixed
-
None
-
None
-
None
Description
It's possible for the ConceptService API method:
List<ConceptSearchResult> getConcepts(String phrase, List<Locale> locales, boolean includeRetired, List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes, Concept answersToConcept, Integer start, Integer size)
... to return two search results for the same concept. This is because of an intricacy of the underlying query--although the query groups by concept id and specifies concept id DISTINCT, because it also groups by concept word, it only removes duplicates where both the concept word AND the concept id are duplicate.
That is why the current unit test for this use case passes--in the test the sample string matches the same concept word twice. With a slight modification, the test will fail.