only call terms lookup once and not per segment
Added support for PatternReplaceCharFilter

PatternReplaceCharFilter allows the use of a regex to manipulate the characters in a string before analysis

Closes #3197