SOLR-2423 -- checking doc.getFieldable avoids unnecessary toString and plays nicer with binary fields

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1083853 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan McKinley 2011-03-21 16:03:35 +00:00
parent a9fda446c3
commit 0655899487
1 changed files with 1 additions and 1 deletions

View File

@ -269,7 +269,7 @@ public class DocumentBuilder {
for (CopyField cf : copyFields) {
SchemaField destinationField = cf.getDestination();
// check if the copy field is a multivalued or not
if (!destinationField.multiValued() && out.get(destinationField.getName()) != null) {
if (!destinationField.multiValued() && out.getFieldable(destinationField.getName()) != null) {
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
"ERROR: "+getID(doc, schema)+"multiple values encountered for non multiValued copy field " +
destinationField.getName() + ": " + v);