<commit_before>class Newsletter < ActiveRecord::Base
  attachment :featured_image
  acts_as_taggable
  include Elasticsearch::Model

  def self.get_ograph_image id
    n = Newsletter.find id
    og = OpenGraph.new(n.url)
    if n.image_url.nil?
      n.image_url = og.images.first
      n.save
    end
  end
end
<commit_msg>Add search<commit_after>class Newsletter < ActiveRecord::Base
  attachment :featured_image
  acts_as_taggable
  include Elasticsearch::Model
  include Elasticsearch::Model::Callbacks

  def self.get_ograph_image id
    n = Newsletter.find id
    og = OpenGraph.new(n.url)
    if n.image_url.nil?
      n.image_url = og.images.first
      n.save
    end
  end
end

{'fraction_non_alphanumeric': 0.07860262008733625, 'fraction_numerical': 0.0, 'mean_word_length': 3.3, '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': '5866252', 'n_tokens_mistral': 236, 'n_tokens_neox': 236, 'n_words': 51}