Method: Elasticsearch::Model::Serializing::InstanceMethods#as_indexed_json
- Defined in:
- lib/elasticsearch/model/serializing.rb
#as_indexed_json(options = {}) ⇒ Hash
Serialize the record as a Hash, to be passed to the client.
Re-define this method to customize the serialization.
43 44 45 46 |
# File 'lib/elasticsearch/model/serializing.rb', line 43 def as_indexed_json(={}) # TODO: Play with the `MyModel.indexes` method -- reject non-mapped attributes, `:as` options, etc self.as_json(.merge root: false) end |