dsmiley commented on code in PR #2666: URL: https://github.com/apache/solr/pull/2666#discussion_r1741228085
########## solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java: ########## @@ -80,6 +94,39 @@ public HttpShardHandler(HttpShardHandlerFactory httpShardHandlerFactory) { shardToURLs = new HashMap<>(); } + /** + * Parse the {@value ShardParams#SHARDS_TOLERANT} param from <code>params</code> as a boolean; + * accepts {@value ShardParams#REQUIRE_ZK_CONNECTED} as a valid value indicating <code>false + * </code>. + * + * <p>By default, returns <code>false</code> when {@value ShardParams#SHARDS_TOLERANT} is not set + * in <code> + * params</code>. + */ + public static boolean getShardsTolerantAsBool(SolrQueryRequest req) { + String shardsTolerantValue = req.getParams().get(ShardParams.SHARDS_TOLERANT); + if (null == shardsTolerantValue + || shardsTolerantValue.trim().equals(ShardParams.REQUIRE_ZK_CONNECTED)) { Review Comment: SOLR-6572 is for XML, and had a different motivating use-case that doesn't apply here. -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org