private boolean toBoolean(String stringValue) {
        return switch (stringValue.toLowerCase()) {
            case "true" -> true;
            case "false" -> false;
            default -> throw new IllegalInputException("Expected 'true' or 'false', got '" + stringValue + "'");
        };
    }
Sets the value from a string

@param stringValue "true" or "false"
@throws IllegalArgumentException if the given value is not equal to "true" nor "false" (ignoring case)
container-search/src/main/java/com/yahoo/prelude/query/BoolItem.java