Module: Aliyun::Log::Record::ClassMethods

Defined in:
lib/aliyun/log/record.rb

Instance Method Summary collapse

Instance Method Details

#logstore(options = {}) ⇒ Object



49
50
51
52
53
54
55
56
57
58
59
# File 'lib/aliyun/log/record.rb', line 49

def logstore(options = {})
  opt = options.dup
  if opt[:timestamps] && !Config.timestamps
    field :created_at, :text
  elsif opt[:timestamps] == false && Config.timestamps
    remove_field :created_at
  end
  self._schema_load = true if opt[:auto_sync] == false
  opt[:field_doc_value] = opt[:field_doc_value] != false
  self.options = opt
end