mirror of https://github.com/apache/lucene.git
oops, broke a test, fixed when a field value does not respond to :each
git-svn-id: https://svn.apache.org/repos/asf/incubator/solr/trunk@496821 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b9e804e032
commit
4c8747190b
|
@ -37,7 +37,11 @@ module Solr
|
|||
case fields
|
||||
when Hash
|
||||
fields.each_pair do |name,value|
|
||||
value.each {|v| @fields << Solr::Field.new(name => v)}
|
||||
if value.respond_to?(:each)
|
||||
value.each {|v| @fields << Solr::Field.new(name => v)}
|
||||
else
|
||||
@fields << Solr::Field.new(name => value)
|
||||
end
|
||||
end
|
||||
when Solr::Field
|
||||
@fields << fields
|
||||
|
|
Loading…
Reference in New Issue