clarin-eric / component-registry-front-end

Test prototype for new CMDI Component Registry frontend
https://trac.clarin.eu/wiki/ComponentRegistryAndEditor/ReactFrontEnd
GNU General Public License v3.0
3 stars 1 forks source link

Longer words in the CCR query seem to yield no results #38

Closed twagoo closed 8 years ago

twagoo commented 8 years ago

No results seem to be shown for words above a certain lengths in the CCR search box. For example, searching for convers* yields results but searching for conversa* doesn't even though "conversation" is one of the results.

This seems to be a client/UI issue, because manually calling the API does work fine for these cases:

twagoo commented 8 years ago

Managed to reproduce this locally with the conversa* query. This resulted in the stack trace

2016-06-13 10:10:14,452 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/ComponentRegistry].[Concept Registry Servlet]#log:182] - Servlet.service() for servlet [Concept Registry Servlet] in context with path [/ComponentRegistry] threw exception [Could not create JSON object] with root cause
org.json.JSONException: JSONObject["dcif:dataCategory"] is not a JSONArray.
    at org.json.JSONObject.getJSONArray(JSONObject.java:578)
    at clarin.cmdi.componentregistry.servlet.ConceptRegistryServlet.serveJSON(ConceptRegistryServlet.java:130)
    at clarin.cmdi.componentregistry.servlet.ConceptRegistryServlet.doGet(ConceptRegistryServlet.java:91)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
twagoo commented 8 years ago

Cause of issue was in back end, and fixed in d8368