-
Feature Request
-
Resolution: Done
-
Major
-
5.1.0.FINAL
-
None
Currently you cannot use relational operators for String fields. e.g. MyFact(name > "bbb")
org.drools.base.evaluators.ComparableEvaluatorsDefinition.evaluators has entries for ValueType.OBJECT_TYPE, but not for ValueType.STRING_TYPE. So it results in DescrBuildError:
=========
Evaluator '>' does not support type 'ValueType = 'String' : [Rule name='Your First Rule']
Unable to create restriction '[LiteralRestriction: > bbb]' for field 'name' in the rule 'Your First Rule' : [Rule name='Your First Rule']
=========
According to docs:
4.8.3.1.1.3.1. Operators
"Other relational operatory may be used whenever the type values are ordered;"
It is desirable to allow relational operators for String fields as String is Comparable.