module ElasticRecord::Model::ClassMethods
Public Instance Methods
arelastic()
click to toggle source
# File lib/elastic_record/model.rb, line 27 def arelastic Arelastic::Builders::Search end
elastic_connection()
click to toggle source
# File lib/elastic_record/model.rb, line 39 def elastic_connection self.elastic_connection_cache ||= ElasticRecord::Connection.new(ElasticRecord::Config.servers, ElasticRecord::Config.connection_options) end
elastic_index()
click to toggle source
# File lib/elastic_record/model.rb, line 31 def elastic_index @elastic_index ||= ElasticRecord::Index.new(self) end
elastic_index=(index)
click to toggle source
# File lib/elastic_record/model.rb, line 35 def elastic_index=(index) @elastic_index = index end
inherited(child)
click to toggle source
Calls superclass method
# File lib/elastic_record/model.rb, line 17 def inherited(child) super if child < child.base_class child.elastic_index = elastic_index.dup child.elastic_index.model = child child.elastic_index.mapping_type = elastic_index.mapping_type end end