<commit_before>class Api::V1::AutoCompleteTaxonConceptsController < ApplicationController

  def index
    params['params'] ||= []
    matcher = Species::TaxonConceptPrefixMatcher.new params
    @taxon_concepts = matcher.cached_results
    render :json => @taxon_concepts,
      :each_serializer => Species::AutocompleteTaxonConceptSerializer,
      :meta => {
        :total => matcher.cached_total_cnt,
        :rank_headers => @taxon_concepts.map(&:rank_name).uniq.map do |r|
          {
            :rank_name => r,
            :taxon_concept_ids => @taxon_concepts.select{|tc| tc.rank_name == r}.map(&:id)
          }
        end
      }
  end

end<commit_msg>[bug on  #63285304]<commit_after>class Api::V1::AutoCompleteTaxonConceptsController < ApplicationController

  def index
    params['ranks'] ||= []
    matcher = Species::TaxonConceptPrefixMatcher.new params
    @taxon_concepts = matcher.cached_results
    render :json => @taxon_concepts,
      :each_serializer => Species::AutocompleteTaxonConceptSerializer,
      :meta => {
        :total => matcher.cached_total_cnt,
        :rank_headers => @taxon_concepts.map(&:rank_name).uniq.map do |r|
          {
            :rank_name => r,
            :taxon_concept_ids => @taxon_concepts.select{|tc| tc.rank_name == r}.map(&:id)
          }
        end
      }
  end

end
{'fraction_non_alphanumeric': 0.12359550561797752, 'fraction_numerical': 0.00749063670411985, 'mean_word_length': 3.0, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '7391452', 'n_tokens_mistral': 454, 'n_tokens_neox': 431, 'n_words': 65}