Fork me on GitHub

{:salience java.lang.Long/MIN_VALUE} is a bad idea?? It's a "final" accumulator.


@souenzzo in what sense do you mean?


Why do you think it might be a bad idea?


There is another way to tell "this should be the last one"?


@souenzzo using MIN_VALUE would work, it just wouldn’t necessarily be the last thing if you accidentally added another rule with the same salience value. If the rulesets are small and/or you’re the only one working on them that might not be a problem. For our large rulesets with lots of people working on them we find it convenient to have salience with domain-specific categories defined in a single location. If you do need other functionality the salience function is user-configurable, although it defaults to a simple numeric comparison.