SOLR-2423 don't add null copy fields

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1083934 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan McKinley 2011-03-21 20:23:39 +00:00
parent 7d32e01d1c
commit 32c6c7aad4
1 changed files with 1 additions and 3 deletions

View File

@ -18,12 +18,10 @@
package org.apache.solr.update;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.document.Fieldable;
import org.apache.solr.common.SolrDocument;
import org.apache.solr.common.SolrException;
@ -286,7 +284,7 @@ public class DocumentBuilder {
Fieldable [] fields = destinationField.createFields(val, boost);
if (fields != null) { // null fields are not added
for (Fieldable f : fields) {
out.add(f);
if(f != null) out.add(f);
}
}
}