diff --git a/elasticsearch-model/lib/elasticsearch/model/indexing.rb b/elasticsearch-model/lib/elasticsearch/model/indexing.rb index 360b8ea85..948c7b62a 100644 --- a/elasticsearch-model/lib/elasticsearch/model/indexing.rb +++ b/elasticsearch-model/lib/elasticsearch/model/indexing.rb @@ -336,7 +336,7 @@ def delete_document(options={}) def update_document(options={}) if changed_attributes = self.instance_variable_get(:@__changed_attributes) attributes = if respond_to?(:as_indexed_json) - changed_attributes.select { |k,v| self.as_indexed_json.keys.include? k } + changed_attributes.select { |k,v| self.as_indexed_json.keys.map(&:to_s).include? k.to_s } else changed_attributes end