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
|
case fields
|
||||||
when Hash
|
when Hash
|
||||||
fields.each_pair do |name,value|
|
fields.each_pair do |name,value|
|
||||||
|
if value.respond_to?(:each)
|
||||||
value.each {|v| @fields << Solr::Field.new(name => v)}
|
value.each {|v| @fields << Solr::Field.new(name => v)}
|
||||||
|
else
|
||||||
|
@fields << Solr::Field.new(name => value)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
when Solr::Field
|
when Solr::Field
|
||||||
@fields << fields
|
@fields << fields
|
||||||
|
|
Loading…
Reference in New Issue