Details
-
Bug
-
Status: Closed
-
Could
-
Resolution: Won't Fix
-
1.0
-
None
-
None
-
High
-
Description
see RESTWS-212 for original work.
As things are now, the URL used for the search MUST include a q parameter, e.g. ?answerTo=<uuid>&q (notice how the parameter is empty). The desired behavior is that there not be a need to have the q parameter when the user doesn't want a name search.
This can be fixed by adding controller methods for "answerTo" and "memberOf". These methods should create the resource object and call the resource's search routine just like the q parameter does.
Inside the "doSearch" method, there should be a check for the q parameter, and if it's not present, assign it whatever is the proper value to get the desired behavior.
There also seems to be a problem in HibernateConceptDAO. In .getCountOfConceptWords, an empty q parameter is replaced by %. In .createConceptWordSearchCriteria:1413, when the % is detected, the words set is given an entry of "%". At :1456, the entry is used for a MatchMode.START restriction, which results in the generation of "LIKE '%%'" by Hibernate. But why should ANY word search criteria be created if q is empty?