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

    https://github.com/apache/lucene-solr/pull/385#discussion_r191663507
  
    --- Diff: 
solr/core/src/java/org/apache/solr/update/processor/IgnoreLargeDocumentProcessorFactory.java
 ---
    @@ -156,7 +160,17 @@ private static long fastEstimate(Map<Object, Object> 
map) {
           if (map.isEmpty()) return 0;
           long size = 0;
           for (Map.Entry<Object, Object> entry : map.entrySet()) {
    -        size += primitiveEstimate(entry.getKey(), 0L) + 
primitiveEstimate(entry.getValue(), 0L);
    +        size += primitiveEstimate(entry.getKey(), 0L);
    +        Object value = entry.getValue();
    +        if (value instanceof Map) {
    +          size += fastEstimate(entry.getValue());
    +        } else if (value instanceof Collection) {
    +          for(Object item: ((Collection) value)) {
    --- End diff --
    
    Oops, my bad


---

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

Reply via email to