Module: Elasticsearch::Model::Serializing::InstanceMethods
- Included in:
- Proxy::InstanceMethodsProxy
- Defined in:
- lib/elasticsearch/model/serializing.rb
Instance Method Summary collapse
-
#as_indexed_json(options = {}) ⇒ Hash
Serialize the record as a Hash, to be passed to the client.
Instance Method Details
#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 |