gus-asf commented on code in PR #2379:
URL: https://github.com/apache/solr/pull/2379#discussion_r1548479424


##########
solr/solrj/src/java/org/apache/solr/client/solrj/request/RequestParamsSupplier.java:
##########
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.client.solrj.request;
+
+import org.apache.solr.common.params.CommonParams;
+import org.apache.solr.common.params.SolrParams;
+
+/** Interface to coordinate param parsing logic when solrj and solrcore both 
use a parameter */
+// TODO: I've just realized that the reason I introduced this class 
(getShardsTolerantAsBool
+//  in ShardParams) is never actually used in solrj code, and only used in 
server side code
+//  despite living in solrj... so maybe I'll just move that method instead...
+public interface RequestParamsSupplier {
+
+  // TODO: Think about use cases, maybe get rid of sysprop?
+  //  For per-index/collection usage setting the allowPartialResults request 
param in defaults
+  //  for the handler is preferred, but for large installations with thousands 
of tenants, possibly
+  // with
+  //  variations in their solrconfg.xml that prevent simple search/replace 
this would be
+  //  impractical. Thus a means of setting a global default seems appropriate. 
System property is
+  //  a quick and dirty way but In "user managed" mode  it could possibly be a 
solr.xml (user's
+  //  responsibility to manage, similar to a system property), and in cloud 
mode this maybe should
+  //  hinge on a  cluster property since there is no conceivable reason to 
have individual nodes
+  //  with differing defaults. For the cloud case we probably would want to 
ignore the setting in
+  //  solr.xml to guard against inconsistent shard behavior due to 
misconfiguration. A further
+  //  consideration is how things like a docker compose or kubernetes system 
ought to be able
+  //  to initialize cluster properties like this for consistent 
non-interactive deployment...
+  String SOLR_DISLIKE_PARTIAL_RESULTS = "solr.dislike.partial.results";

Review Comment:
   Re: name... I was trying to come up with something shorter than 
`solr.return.partial.results.by.default` which is clear but ridiculously long. 
I'll think about the env var strategy, though it continues to trouble me that 
there's no good way to express a cluster wide setting in a single place... but 
that's also likely a separate issue.



-- 
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

Reply via email to