kotman12 commented on code in PR #4149:
URL: https://github.com/apache/solr/pull/4149#discussion_r3012372289


##########
solr/solrj/src/java/org/apache/solr/client/solrj/response/LukeResponse.java:
##########
@@ -257,19 +285,42 @@ public String getIndexDirectory() {
     return (String) indexInfo.get("directory");
   }
 
-  public Integer getNumDocs() {
+  private Long getIndexLong(String key) {
     if (indexInfo == null) return null;
-    return (Integer) indexInfo.get("numDocs");
+    Number n = (Number) indexInfo.get(key);
+    return n != null ? n.longValue() : null;
+  }
+
+  public Integer getNumDocs() {

Review Comment:
   @dsmiley I took your advice from another comment to gate the response based 
on user agent's solr version. When I detect that the major version is less 
than, say, 10.2.0 I narrow the long `docs` to int whenever possible so as to 
break as few people as possible. Otherwise I really think this could be a 
problem assuming we make `distrib=true` the default (at least when addressing a 
collection as per your other comment).
   
   Edit:
   One extra thing to consider here is if the narrowing function belongs in 
some util class assuming of course it even makes sense.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to