<commit_before>module Organisation::OrganisationSearchIndexConcern
  extend ActiveSupport::Concern

  included do
    after_update :update_search_index
  end

  def update_search_index
    if going_live_on_govuk?
      corporate_information_pages.each(&:update_in_search_index)
    elsif leaving_live_on_govuk?
      corporate_information_pages.each(&:remove_from_search_index)
    end
  end
<commit_msg>Only add/remove published corp info pages<commit_after>module Organisation::OrganisationSearchIndexConcern
  extend ActiveSupport::Concern

  included do
    after_update :update_search_index
  end

  def update_search_index
    if going_live_on_govuk?
      published_corporate_information_pages.each(&:update_in_search_index)
    elsif leaving_live_on_govuk?
      published_corporate_information_pages.each(&:remove_from_search_index)
    end
  end

{'fraction_non_alphanumeric': 0.04789719626168224, 'fraction_numerical': 0.0, 'mean_word_length': 5.6434108527131785, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6887225', 'n_tokens_mistral': 269, 'n_tokens_neox': 257, 'n_words': 43}