Class SettingsFilter

java.lang.Object
org.elasticsearch.common.settings.SettingsFilter

public final class SettingsFilter extends Object
A class that allows to filter settings objects by simple regular expression patterns or full settings keys. It's used for response filtering on the rest layer to for instance filter out sensitive information like access keys.
  • Field Details

    • SETTINGS_FILTER_PARAM

      public static String SETTINGS_FILTER_PARAM
      Can be used to specify settings filter that will be used to filter out matching settings in toXContent method
  • Constructor Details

  • Method Details

    • getPatterns

      public Set<String> getPatterns()
      Returns a set of patterns
    • isValidPattern

      public static boolean isValidPattern(String pattern)
      Returns true iff the given string is either a valid settings key pattern or a simple regular expression
      See Also:
      Regex, AbstractScopedSettings.isValidKey(String)
    • addFilterSettingParams

      public void addFilterSettingParams(RestRequest request)
    • filterSettings

      public static Settings filterSettings(org.elasticsearch.common.xcontent.ToXContent.Params params, Settings settings)
    • filter

      public Settings filter(Settings settings)