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