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

    https://github.com/apache/lucene-solr/pull/385#discussion_r192623213
  
    --- Diff: 
solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java ---
    @@ -952,12 +941,15 @@ public void split(SplitIndexCommand cmd) throws 
IOException {
        *
        * @param cmd - cmd apply to IndexWriter
        * @param writer - IndexWriter to use
    -   * @param updateTerm - used if this cmd results in calling {@link 
IndexWriter#updateDocument}
        */
    -  private void updateDocOrDocValues(AddUpdateCommand cmd, IndexWriter 
writer, Term updateTerm) throws IOException {
    +  private Term updateDocOrDocValues(AddUpdateCommand cmd, IndexWriter 
writer) throws IOException {
         assert null != cmd;
         final SchemaField uniqueKeyField = 
cmd.req.getSchema().getUniqueKeyField();
         final String uniqueKeyFieldName = null == uniqueKeyField ? null : 
uniqueKeyField.getName();
    +    List<SolrInputDocument> docs = cmd.computeFinalFlattenedSolrDocs();
    --- End diff --
    
    I don't think these lines you've added should be placed here, as it's 
computing final flattened docs when they may not even be needed -- which is 
when cmd.isInPlaceUpdate.  You could move this entirely to updateDocument()?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to