vyatkinv commented on code in PR #4320:
URL: https://github.com/apache/solr/pull/4320#discussion_r3176892261
##########
solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/graph/ShortestPathStream.java:
##########
@@ -194,42 +193,24 @@ public ShortestPathStream(StreamExpression expression,
StreamFactory factory) th
Integer.parseInt(((StreamExpressionValue)
depthExpression.getParameter()).getValue());
}
- ModifiableSolrParams params = new ModifiableSolrParams();
- for (StreamExpressionNamedParameter namedParam : namedParams) {
- if (!namedParam.getName().equals("zkHost")
- && !namedParam.getName().equals("to")
- && !namedParam.getName().equals("from")
- && !namedParam.getName().equals("edge")
- && !namedParam.getName().equals("maxDepth")
- && !namedParam.getName().equals("threads")
- && !namedParam.getName().equals("partitionSize")) {
- params.set(namedParam.getName(),
namedParam.getParameter().toString().trim());
- }
- }
-
- // zkHost, optional - if not provided then will look into factory list to
get
- String zkHost = null;
- if (null == zkHostExpression) {
- zkHost = factory.getCollectionZkHost(collectionName);
- if (zkHost == null) {
- zkHost = factory.getDefaultZkHost();
- }
- } else if (zkHostExpression.getParameter() instanceof
StreamExpressionValue) {
- zkHost = ((StreamExpressionValue)
zkHostExpression.getParameter()).getValue();
- }
-
- if (null == zkHost) {
- throw new IOException(
- String.format(
- Locale.ROOT,
- "invalid expression %s - zkHost not found for collection '%s'",
- expression,
- collectionName));
- }
+ ModifiableSolrParams params =
+ getModifiableSolrParamsWithExclusions(
Review Comment:
done
--
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]