<commit_before>module Typus
  module Controller
    module Autocomplete

      def autocomplete
        if params[:term]
          params.merge!(:search => params[:term])
          get_objects
          @items = @resource.limit(20)
          render :json => @items.map { |i| { "id" => i.id, "label" => i.to_label, "value" => i.to_label, "name" => i.to_label } }
        end
      end

    end
  end
end<commit_msg>Return only the data I really need<commit_after>module Typus
  module Controller
    module Autocomplete

      def autocomplete
        if params[:term]
          params.merge!(:search => params[:term])
          get_objects
          @items = @resource.limit(20)
          render :json => @items.map { |i| { "id" => i.id, "name" => i.to_label } }
        end
      end

    end
  end
end
{'fraction_non_alphanumeric': 0.12453300124533001, 'fraction_numerical': 0.0049813200498132005, 'mean_word_length': 2.0804597701149423, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '4537095', 'n_tokens_mistral': 257, 'n_tokens_neox': 246, 'n_words': 65}