Search doesn't handle hyphen well

Steps to reproduce

Steps to reproduce:
1. Go to Recordings->Events
2. Try to search for an existing string containing an hyphen, e.g. evt-ser-01

Affected places:

  • Recordings->Events

  • Recordings->Series

  • Configuration->Themes

Actual Results:
As soon as the search string contains a hyphen characters ('-'), it is not possible to get any useful search results

Expected Results:
The hyphen character should be considered as character that can be contained in names and can be searched for, i.e. if an event has the title evt-upl-01, search for 'evt-upl' should match.

Workaround (if any):

UPDATE June 2016

Opencast currently seems to use the Lucene StandardAnalyzer that will omit hyphen completely, so there is no way to search for hyphenated words. Fixing this would require us to use a different analyzer as described on:

for example.

Just google for "lucene hyphen" to find out more about this.


Lars Kiesow
October 22, 2017, 6:33 PM

Sven, iirc, you fixed this, right?
If not, please re-open

Greg Logan
December 8, 2015, 5:33 PM

Merged PR 709 () as d207eb2.

Lukas Rohner
December 2, 2015, 11:36 AM

I checked the other search fields and didn't find anything wrong from a first inspection. So I suggest we merge the current review but reopen the ticket for an additional fix?

Sven Stauber
November 18, 2015, 8:11 AM

We also had a closer look at the search (but focussed on events/series). What we found is that the current implementation (before Lukas fix of this issue) has a lot of problems:

  • Some of the special characters work well (e.g. '?' as wildcard for one character) while others don't work (e.g. escaping special characters using '\')

  • the search query parser crashes (exception in log of admin node) quite often when using special characters leading to inconsistent results from the point of view of the user

I think that simply escaping the special characters as Lukas did makes sense in means of providing a robust search, although we (for now) loose some (undocumented) search features.

Lukas Rohner
November 18, 2015, 7:10 AM

Hi Greg, I guess this is an issue with the themes search itself. I tested it with the events/series search only. I will check the remaining search fields.

Your pinned fields
Click on the next to a field label to start pinning.


Sven Stauber


Sven Stauber


Usability Issue

Tags (folksonomy)