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