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
As soon as the search string contains a hyphen characters ('-'), it is not possible to get any useful search 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:
Just google for "lucene hyphen" to find out more about this.
Sven, iirc, you fixed this, right?
If not, please re-open
Merged PR 709 () as d207eb2.
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?
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.
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.