<commit_before># In development environments we don't want to depend on Rummager unless
# explicitly told to do so
unless Rails.env.development?
  update_search = ENV['QUIRKAFLEEG_SEARCH_DISABLE'].nil?
else
  update_search = ENV['UPDATE_SEARCH'].present?
end

if update_search
  Rails.logger.info "Registering search observer for artefacts"
  # Use to_prepare so this gets reloaded with the app when in development
  # In production, it will only be called once
  ActionDispatch::Callbacks.to_prepare do
    Panopticon::Application.config.mongoid.observers << :update_search_observer
  end<commit_msg>Brute force update_search for now<commit_after># In development environments we don't want to depend on Rummager unless
# explicitly told to do so
unless Rails.env.development?
  update_search = ENV['QUIRKAFLEEG_SEARCH_DISABLE'].nil?
else
  update_search = ENV['UPDATE_SEARCH'].present?
end

update_search = true

if update_search
  Rails.logger.info "Registering search observer for artefacts"
  # Use to_prepare so this gets reloaded with the app when in development
  # In production, it will only be called once
  ActionDispatch::Callbacks.to_prepare do
    Panopticon::Application.config.mongoid.observers << :update_search_observer
  end
{'fraction_non_alphanumeric': 0.06672025723472669, 'fraction_numerical': 0.0, 'mean_word_length': 5.450777202072539, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4876926', 'n_tokens_mistral': 371, 'n_tokens_neox': 360, 'n_words': 121}