<commit_before>class ClearESCaches
  def initialize(options={})
    @to_clear = options[:type]
    @host = options[:host]
    @port = options[:port]
  end

  def clear_all
    `curl -s -XPOST 'http://#{@host}:#{@port}/_all/_cache/clear?field_data=true&filter=true&bloom=true' ; echo`
  end

  def clear_filter_cache
    `curl -s -XPOST 'http://#{@host}:#{@port}/_all/_cache/clear?field_data=false&filter=true&bloom=true' ; echo`
  end

  def clear_fielddata
    `curl -s -XPOST 'http://#{@host}:#{@port}/_all/_cache/clear?field_data=true&filter=false&bloom=true' ; echo`
  end

  def run
    puts @to_clear
    case command = @to_clear.to_sym
      when :all then clear_all
      when :filter then clear_filter_cache
      when :fielddata then clear_fielddata
      else abort "#{command} not recognized"
    end
  end

end<commit_msg>try without clear_all but clear_filter_cache then clear_fielddata<commit_after>class ClearESCaches
  def initialize(options={})
    @to_clear = options[:type]
    @host = options[:host]
    @port = options[:port]
  end

  def clear_all
    `curl -s -XPOST 'http://#{@host}:#{@port}/_all/_cache/clear?field_data=true&filter=true&bloom=true' ; echo`
  end

  def clear_filter_cache
    `curl -s -XPOST 'http://#{@host}:#{@port}/_all/_cache/clear?field_data=false&filter=true&bloom=true' ; echo`
  end

  def clear_fielddata
    `curl -s -XPOST 'http://#{@host}:#{@port}/_all/_cache/clear?field_data=true&filter=false&bloom=true' ; echo`
  end

  def run
    puts @to_clear
    case command = @to_clear.to_sym
      when :all then
        clear_filter_cache
        clear_fielddata
      when :filter then clear_filter_cache
      when :fielddata then clear_fielddata
      else abort "#{command} not recognized"
    end
  end

end
{'fraction_non_alphanumeric': 0.13499716392512762, 'fraction_numerical': 0.0, 'mean_word_length': 3.716577540106952, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5770378', 'n_tokens_mistral': 626, 'n_tokens_neox': 625, 'n_words': 130}