-
Couldn't load subscription status.
- Fork 808
Closed
Description
Hi,
This is similar to issue #140
If I have the following model defined
class Article < ActiveRecord::Base
include Elasticsearch::Model
def as_indexed_json(options = {})
{ description: self.description }
{ short_description: self.description[0...100] }
end
end
Calling update_document will not update the short_description field because in the update_document method here:
self.as_indexed_json.select { |k,v| changed_attributes.keys.map(&:to_s).include? k.to_s }
It will only select attributes that are defined in the model
Metadata
Metadata
Assignees
Labels
No labels