Method: Elastictastic::Properties#elasticsearch_doc
- Defined in:
- lib/elastictastic/properties.rb
#elasticsearch_doc ⇒ Object
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
# File 'lib/elastictastic/properties.rb', line 165 def elasticsearch_doc {}.tap do |doc| @_attributes.each_pair do |field, value| next if value.nil? doc[field] = Util.call_or_map(value) do |item| serialize_value(field, item) end end @_embeds.each_pair do |field, | next if .nil? doc[field] = Util.call_or_map() do |item| item.elasticsearch_doc end end end end |