samueleresca commented on code in PR #481:
URL: 
https://github.com/apache/incubator-pekko-connectors/pull/481#discussion_r1495084621


##########
solr/src/main/scala/org/apache/pekko/stream/connectors/solr/impl/SolrFlowStage.scala:
##########
@@ -114,8 +113,12 @@ private final class SolrFlowLogic[T, C](
 
       message.routingFieldValue.foreach { routingFieldValue =>
         val routingField = client match {
-          case csc: CloudSolrClient =>
-            Option(csc.getIdField)
+          case csc: CloudSolrClient => {
+            val docCollection = 
Option(csc.getZkStateReader.getClusterState.getCollectionOrNull(collection))

Review Comment:
   minor: I think you can directly access the docCollection using 
`csc.getZkStateReader.getCollection`. The underlying call is checking for the 
`clusterState` and calls the `getCollectionOrNull` 



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