mirror of https://github.com/apache/lucene.git
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:
parent
a9fda446c3
commit
0655899487
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue