if (node instanceof WildcardQueryNode
|| node instanceof FuzzyQueryNode
|| (node instanceof FieldQueryNode && node.getParent() instanceof RangeQueryNode)
|| node instanceof RegexpQueryNode) {
TextableQueryNode txtNode = (TextableQueryNode) node;
CharSequence text = txtNode.getText();
txtNode.setText(text != null ? UnescapedCharSequence.toLowerCase(text, locale) : null);
}
return node;
}