[ https://issues.apache.org/jira/browse/SOLR-11868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17166757#comment-17166757 ]
Erick Erickson commented on SOLR-11868: --------------------------------------- [~ichattopadhyaya] {quote}bq. Today, a user doesn't need ZooKeeper in order to use CloudSolrClient {quote} Odd name then ;) Anyway, no it does not introduce a new dependency on ZK. The code that looks anywhere already called getDocCollection and I used the return from that to pull out the route field. I looked at the code again and it could be a little tighter. I suppose that {color:#000000}col{color}.getRouter() could theoretically return null and generate an NPE where I call col.getRouter().getRouteField(), but col.getRouter() references a field that looks to be required > Deprecate CloudSolrClient.setIdField, use information from Zookeeper > -------------------------------------------------------------------- > > Key: SOLR-11868 > URL: https://issues.apache.org/jira/browse/SOLR-11868 > Project: Solr > Issue Type: Improvement > Affects Versions: 7.2 > Reporter: Erick Erickson > Assignee: Erick Erickson > Priority: Major > Fix For: 8.7 > > > IIUC idField has nothing to do with the <uniqueKey> field. It's really > the field used to route documents. Agreed, this is often the "id" > field, but still.... > In fact, over in UpdateReqeust.getRoutes(), it's passed as the "id" > field to router.getTargetSlice() and just works, even though > getTargetSlice is clearly designed to route on a field other than the > <uniqueKey> if we didn't just pass null as the "route" param. > The confusing bit is that if I have a route field defined for my > collection and want to use CloudSolrClient I have to figure out that I > need to use the setIdField method to use that field for routing. > > We should deprecate setIdField and refactor how this is used (i.e. > getRoutes). Need to beef up tests too I suspect. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org