What can the search do?


The AdminUI sends the search string to the backend (textFilter) for each request. In its original Opencast 2.0 implementation, there were many exceptions caused by a parser that tries to interpret "textFilter" as a search query (not just a plain search string).
This was fixed in Opencast 2.1.0 (see https://bitbucket.org/opencast-community/matterhorn/pull-requests/709/mh-11182-fixed-full-text-search-with/diff) by just escaping the search string of the AdminUI so that the parser can always successfully parse it.

While this is an improvement, we ...

  • loose all advanced search queries facilities

  • still don't get the correct search results when hyphen characters are used

Considering the advanced search queries:
In Opencast 2.0, the following special characters could be used:

  • '-' to indicate that the word following after the hyphen must not match

  • '+' to indicate that the word following after the plus must match

  • 'and' and 'or': logics as expected

The goal of this task is to find out what kind of advanced queries (see examples above) would work if we don't escape the special characters.
Based on this information, we would decide how to fix the search so that it works once and for all time


Sven Stauber
June 3, 2016, 8:41 AM

Closing this in favor of the more pragmatic

Former user
March 11, 2016, 5:14 PM

Its odd that the IndexUtils.clean() "Clean up the user query input string to avoid invalid input parameters." [1] is not referenced by any code, except its own JUNIT test, and never was: "git diff 3efa510..HEAD | grep IndexUtils.clean" has no results. It seems related to this ticket.
[1] https://bitbucket.org/opencast-community/matterhorn/src/32e1076f0298778bdacfc98787e9d05225baec98/modules/matterhorn-search/src/main/java/org/opencastproject/matterhorn/search/impl/IndexUtils.java?at=develop&fileviewer=file-view-default#IndexUtils.java-45

[EDIT] that method appears to be a copy-paste artifact from the SolrUtils.clean()[2] used by the old Search Service Impl's SolrIndexManager
[2] https://bitbucket.org/opencast-community/matterhorn/src/32e1076f0298778bdacfc98787e9d05225baec98/modules/matterhorn-common/src/main/java/org/opencastproject/util/SolrUtils.java?at=develop&fileviewer=file-view-default#SolrUtils.java-47

Won't Fix


Sven Stauber


Sven Stauber