public static RankingExpression from(String expression) {
        try {
            return new RankingExpression(expression);
        }
        catch (ParseException e) {
            throw new IllegalStateException(e);
        }
    }
Creates a ranking expression from a string

@throws IllegalArgumentException if the string is not a valid ranking expression
searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/RankingExpression.java