* @return the checked query
* @throws SearchQueryException if the query is not parsable
*/
private static String checkQueryParses(String query) {
try {
new QueryTreeBuilder().parse(query);
} catch (RecognitionException e) {
throw new SearchQueryException("Unable to parse query: " + query);
}
return query;
}