Github user dsmiley commented on a diff in the pull request: https://github.com/apache/lucene-solr/pull/385#discussion_r191401990 --- Diff: solr/solrj/src/java/org/apache/solr/common/SolrInputDocument.java --- @@ -259,6 +260,17 @@ public void addChildDocuments(Collection<SolrInputDocument> children) { } } + public Map<String, SolrInputField> getChildDocumentsMap() { + Map<String, SolrInputField> childDocs = new HashMap<>(); + for (SolrInputField field: values()) { + Object value = field.getFirstValue(); + if (value instanceof SolrInputDocument) { + childDocs.put(field.getName(), field); + } + } + return childDocs.size() > 0 ? childDocs: null; + } + /** Returns the list of child documents, or null if none. */ --- End diff -- This method now needs some clear documentation to say it returns *anonymous* child documents.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org