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

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

Instance Method Summary collapse

Instance Method Details

#logstore(options = {}) ⇒ Object



44
45
46
47
48
49
50
51
52
53
54
# File 'lib/aliyun/log/record.rb', line 44

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