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

    https://github.com/apache/lucene-solr/pull/455#discussion_r228174440
  
    --- Diff: solr/core/src/java/org/apache/solr/update/AddUpdateCommand.java 
---
    @@ -262,6 +263,11 @@ private void flattenAnonymous(List<SolrInputDocument> 
unwrappedDocs, SolrInputDo
         flattenAnonymous(unwrappedDocs, currentDoc, false);
       }
     
    +  public String getRouteFieldVal() {
    --- End diff --
    
    What code duplication?
    
    I think we need to standardize/harmonize route a bit.  Notice UpdateCommand 
has setRoute & getRoute.  Lets initialize route in the constructor here by the 
presence of \_route\_ in the params.  Then lets not look for _route_ in params 
later since we know we can get it here.  Then I think 
`org.apache.solr.update.processor.DistributedUpdateProcessor#setupRequest(java.lang.String,
 org.apache.solr.common.SolrInputDocument)` can be removed and instead insist 
everyone call the overloaded version that takes a route, and each caller looks 
up the route from the command.  It's not clear to me if "null" actually should 
be passed to route in any circumstance.


---

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

Reply via email to