Apache Solr open-source search software
SOLR-16101: Add empty constructor for SolrInputDocument (#746)
Anshum Gupta428ca61530c8
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 0e149cf1f34..fd85222916e 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -643,6 +643,8 @@ and each individual module's jar will be included in its directory's lib/ folder* SOLR-16061: CloudSolrClient refactoring: Removed ZK specific methods (Haythem Khiri, David Smiley, janhoy)+* SOLR-16101: Add empty constructor for SolrInputDocument (Anshum Gupta)+Bug Fixes---------------------* SOLR-15849: Fix the connection reset problem caused by the incorrect use of 4LW with \n when monitoring zooKeeper status (Fa Ming).diff --git a/solr/solrj/src/java/org/apache/solr/common/SolrInputDocument.java b/solr/solrj/src/java/org/apache/solr/common/SolrInputDocument.javaindex f9ffaaa158d..db99bc0e75f 100644--- a/solr/solrj/src/java/org/apache/solr/common/SolrInputDocument.java+++ b/solr/solrj/src/java/org/apache/solr/common/SolrInputDocument.java@@ -38,6 +38,11 @@ public class SolrInputDocument extends SolrDocumentBase<SolrInputField, SolrInpuprivate final Map<String, SolrInputField> _fields;private List<SolrInputDocument> _childDocuments;+ // Required by reflection based libraries for (de)serialization+ public SolrInputDocument() {+ _fields = new LinkedHashMap<>();+ }+public SolrInputDocument(String... fields) {_fields = new LinkedHashMap<>();assert fields.length % 2 == 0;