<commit_before>class Download::Requesters::Search < Download::Requesters::Base
  def initialize search_term, filters
    @search_term = search_term
    @filters = filters
  end

  def request
    unless ['ready', 'generating'].include? generation_info['status']
      DownloadWorkers::Search.perform_async(token, @search_term, filters.to_json)
    end

    {'token' => token}.merge(generation_info)
  end

  def domain
    'search'
  end

  private

  def identifier
    token
  end

  def token
    @token ||= begin
      filters_dump = Marshal.dump filters.sort_by{|filter| filter['name']}<commit_msg>fix filters sorting in Download::Requesters::Search<commit_after>class Download::Requesters::Search < Download::Requesters::Base
  def initialize search_term, filters
    @search_term = search_term
    @filters = filters
  end

  def request
    unless ['ready', 'generating'].include? generation_info['status']
      DownloadWorkers::Search.perform_async(token, @search_term, filters.to_json)
    end

    {'token' => token}.merge(generation_info)
  end

  def domain
    'search'
  end

  private

  def identifier
    token
  end

  def token
    @token ||= begin
      filters_dump = Marshal.dump filters.keys.sort
{'fraction_non_alphanumeric': 0.10401310401310401, 'fraction_numerical': 0.0, 'mean_word_length': 3.8685258964143427, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7577026', 'n_tokens_mistral': 373, 'n_tokens_neox': 355, 'n_words': 86}