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

    https://github.com/apache/lucene-solr/pull/385#discussion_r191643680
  
    --- Diff: solr/core/src/java/org/apache/solr/update/AddUpdateCommand.java 
---
    @@ -175,69 +176,92 @@ public String getHashableId() {
         return id;
       }
     
    -  public boolean isBlock() {
    -    return solrDoc.hasChildDocuments();
    +  /**
    +   * @return String id to hash
    +   */
    +  public String getHashableId() {
    +    return getHashableId(solrDoc);
       }
     
    -  @Override
    -  public Iterator<Document> iterator() {
    -    return new Iterator<Document>() {
    -      Iterator<SolrInputDocument> iter;
    -
    -      {
    -        List<SolrInputDocument> all = flatten(solrDoc);
    -
    -        String idField = getHashableId();
    -
    -        boolean isVersion = version != 0;
    +  public boolean isBlock() {
    --- End diff --
    
    perhaps it could be made a static, with the List of documents passed as a 
parameter, to avoid duplication of code.


---

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

Reply via email to