public FilterExpressionNode toFilterExpressionNode(FilterExpression expression) {
        if (expression instanceof RegexPredicate rp) {
            return new RegexPredicateNode(rp.getPattern(), toExpressionNode(rp.getExpression()));
        } else {
            throw new IllegalInputException(
                    "Can not convert '%s' to a filter expression.".formatted(expression.getClass().getSimpleName()));
        }
    }
Converts instances of {@link FilterExpression} to a corresponding back-end type ({@link FilterExpressionNode}).
container-search/src/main/java/com/yahoo/search/grouping/vespa/ExpressionConverter.java