Details
-
Bug
-
Status: Closed
-
TBD
-
Resolution: Fixed
-
OpenMRS 1.9.1
Description
Concept names containing stop words do not show up when expected in search results.
Steps to reproduce the problem
- Browse to the concept search page on the demo site.
- Type FAILURE, THRIVE, or FAILURE THRIVE in the search box and results including FAILURE TO THRIVE will appear below.
- Change the search to FAILURE TO THRIVE and the search returns zero results.
- Type HEPATITIS, VACCINATION, or HEPATITIS VACCINATION in the search box and results including HEPATITIS A VACCINATION will appear below.
- Change the search to HEPATITIS A VACCINATION and the search returns zero results.
Observed behavior
Exact matches to concept names containing stop words do not appear in search results for concepts.
Expected behavior
An exact match should always be shown as a result, regardless of whether or not the concept name contains stop words.
This behavior was confirmed with OpenMRS 1.9.1 on demo.openmrs.org and with OpenMRS 1.10 on nightly.openmrs.org
Fixing the problem
- Create a unit test (e.g., "@should match exact names containing stop words") that searches for a concept name containing a stop word by its exact name (the test should fail).
- Identify why concept names containing stop words are not considered matches to their exact name.
- Fix the problem.
- Ensure that the new unit test (along with all other existing unit tests) pass.