@Override
public CharFilterFactory create(String name, Settings settings) {
Version indexVersion = Version.indexCreated(settings);
if (!Version.CURRENT.equals(indexVersion)) {
PreBuiltCharFilters preBuiltCharFilters = PreBuiltCharFilters.getOrDefault(name, null);
if (preBuiltCharFilters != null) {
return preBuiltCharFilters.getCharFilterFactory(indexVersion);
}
}
return charFilterFactory;
}