Module: ActiveSearch::ElasticSearch
- Defined in:
- lib/activesearch/elastic_search.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
21 22 23 24 25 |
# File 'lib/activesearch/elastic_search.rb', line 21 def self.included(base) base.class_eval do include ActiveSearch::Base end end |
Instance Method Details
#to_indexable ⇒ Object
27 28 29 30 31 |
# File 'lib/activesearch/elastic_search.rb', line 27 def to_indexable elastic_properties.keys.inject({_type: self.elastic_type}) do |memo,field| memo.merge!(field => self.send(field)) end end |