lib/active_groonga/persistence.rb in activegroonga-1.0.1 vs lib/active_groonga/persistence.rb in activegroonga-1.0.3
- old
+ new
@@ -140,10 +140,11 @@
if record.support_key?
attributes["key"] = record.key
else
attributes["id"] = record.id
end
+ attributes["score"] = record.score if record.support_sub_records?
record.columns.each do |column|
next if column.is_a?(Groonga::IndexColumn)
value = record[column.local_name]
if value and column.reference?
value_class = self.class.custom_reference_class(column.local_name)
@@ -165,8 +166,9 @@
else
@attributes = extract_attributes(record)
end
@id = @attributes.delete("id")
@key = @attributes.delete("key")
+ @score = @attributes.delete("score")
end
end
end