<commit_before>module Georgia
  module Api
    class MediaController < Georgia::ApplicationController

      def pictures
        @search = Ckeditor::Picture.search do
          fulltext params[:query] do
            fields(:filename, :tags)
          end
          paginate(page: params[:page], per_page: (params[:per] || 12))
        end
        @pictures = @search.results
        render layout: false
      end

    end
  end
end<commit_msg>Fixes api media query to load from indexer<commit_after>module Georgia
  module Api
    class MediaController < Georgia::ApplicationController

      def pictures
        @pictures = Georgia::Indexer.search(Ckeditor::Picture, params.merge(per: 12))
        @pictures = Ckeditor::PictureDecorator.decorate_collection(@pictures)
        render layout: false
      end

    end
  end
end
{'fraction_non_alphanumeric': 0.08202653799758745, 'fraction_numerical': 0.0048250904704463205, 'mean_word_length': 2.7219730941704037, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7383535', 'n_tokens_mistral': 235, 'n_tokens_neox': 221, 'n_words': 61}