<commit_before>class ThinkingSphinx::Search::BatchInquirer
  def initialize(&block)
    @queries = []

    yield self
  end

  def append_query(query)
    @queries << query
  end

  def results
    @results ||= begin
      @queries.freeze

      connection = ThinkingSphinx::Configuration.instance.connection
      results    = connection.query @queries.join('; ')

      (1..(@queries.length - 1)).collect {
        connection.store_result if connection.next_result
      }.unshift results
    end
  end
end<commit_msg>Much improved BatchInquirer#results<commit_after>class ThinkingSphinx::Search::BatchInquirer
  def initialize(&block)
    @queries = []

    yield self
  end

  def append_query(query)
    @queries << query
  end

  def results
    @results ||= begin
      @queries.freeze

      results  = [connection.query(@queries.join('; '))]
      results << connection.store_result while connection.next_result
      results
    end
  end

  private

  def connection
    @connection ||= ThinkingSphinx::Configuration.instance.connection
  end
end
{'fraction_non_alphanumeric': 0.09933774834437085, 'fraction_numerical': 0.001892147587511826, 'mean_word_length': 3.1328125, 'pattern_counts': {'":': 0, '<': 9, '<?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': '6805706', 'n_tokens_mistral': 328, 'n_tokens_neox': 309, 'n_words': 68}