Github user dsmiley commented on a diff in the pull request: https://github.com/apache/lucene-solr/pull/385#discussion_r191980588 --- Diff: solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java --- @@ -973,16 +976,43 @@ private void updateDocOrDocValues(AddUpdateCommand cmd, IndexWriter writer, Term } private void updateDocument(AddUpdateCommand cmd, IndexWriter writer, Term updateTerm) throws IOException { + List<SolrInputDocument> docs = cmd.getDocsList(); + if (cmd.isBlock()) { - log.debug("updateDocuments({})", cmd); - writer.updateDocuments(updateTerm, cmd); + log.debug("updateDocuments({})", docs); + writer.updateDocuments(updateTerm, toDocumentsIter(docs, cmd.req.getSchema())); } else { Document luceneDocument = cmd.getLuceneDocument(false); log.debug("updateDocument({})", cmd); writer.updateDocument(updateTerm, luceneDocument); } } + private Iterable<Document> toDocumentsIter(Collection<SolrInputDocument> docs, IndexSchema schema) { --- End diff -- I think `Iterables.transform` is a little leaner than indirectly getting there via FluentIterable. I don't think FluentIterable is more concise here.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org