Github user justinleet commented on a diff in the pull request: https://github.com/apache/metron/pull/911#discussion_r164842946 --- Diff: metron-platform/metron-solr/src/test/java/org/apache/metron/solr/integration/components/SolrComponent.java --- @@ -158,4 +162,16 @@ public boolean hasCollection(String collection) { } return docs; } + + public void addDocs(String collection, List<Map<String, Object>> docs) + throws IOException, SolrServerException { + CloudSolrClient solr = miniSolrCloudCluster.getSolrClient(); + solr.setDefaultCollection(collection); + Collection<SolrInputDocument> solrInputDocuments = docs.stream().map(doc -> { + SolrInputDocument solrInputDocument = new SolrInputDocument(); + doc.entrySet().forEach(entry -> solrInputDocument.addField(entry.getKey(), entry.getValue())); --- End diff -- This line can be ``` doc.forEach(solrInputDocument::addField); ```
---