Github user dsmiley commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/385#discussion_r191978869
  
    --- Diff: 
solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java ---
    @@ -417,7 +417,8 @@ private void addAndDelete(AddUpdateCommand cmd, 
List<UpdateLog.DBQ> deletesAfter
       }
     
       private Term getIdTerm(AddUpdateCommand cmd) {
    --- End diff --
    
    Latest diff shows this logic calls cmd.computeFlattenedDocs() and we 
definitely don't want this method computing that!
    Now that I look at the code in my IDE, I can appreciate that this is a bit 
of a tricky issue though, since neither callers of getIdTerm yet have the 
List<SolrInputDocument> to give to this method.  Hmmmm.   Maybe 
`updateDocument` should not take an updateTerm as an argument but should 
instead figure it out and return it?  Note that if isInPlaceUpdate, the 
updateTerm will always be the unique key field; you needn't check for a list of 
docs.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to