[ https://issues.apache.org/jira/browse/SOLR-14630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ivan Djurasevic updated SOLR-14630: ----------------------------------- Description: Precondition: create collection with 4 shards on one server. During search and update, solr cloud client picks wrong core even _route_ exists in query param. In BaseSolrClient class, method sendRequest, {quote}{{sortedReplicas.forEach( replica -> {}} {{ if (seenNodes.add(replica.getNodeName()))}}{{{ theUrlList.add(ZkCoreNodeProps.getCoreUrl(replica.getBaseUrl(), joinedInputCollections)); }}}{{});}}{quote} Previous part of code adds base url(localhost:8983/solr/collection_name) to theUrlList, it doesn't create core address(localhost:8983/core_name). If we change previous code to: {quote}sortedReplicas.forEach(replica -> { if (seenNodes.add(replica.getNodeName()) { theUrlList.add(replica.getCoreUrl()); } }); {quote} Solr cloud client picks core which is defined with _route_ parameter. was: Precondition: create collection with 4 shards on one server. During search and update, solr cloud client picks wrong core even _route_ exists in query param. In BaseSolrClient class, method sendRequest, {quote}sortedReplicas.forEach( replica -> { if (seenNodes.add(replica.getNodeName())){ theUrlList.add(ZkCoreNodeProps.getCoreUrl(replica.getBaseUrl(), joinedInputCollections)); } }); {quote} Previous part of code adds base url(localhost:8983/solr/collection_name) to theUrlList, it doesn't create core address(localhost:8983/core_name). If we change previous code to: {quote}sortedReplicas.forEach(replica -> { if (seenNodes.add(replica.getNodeName()) { theUrlList.add(replica.getCoreUrl()); } }); {quote} Solr cloud client picks core which is defined with _route_ parameter. > CloudSolrClient doesn't pick correct core when server contains more shards > -------------------------------------------------------------------------- > > Key: SOLR-14630 > URL: https://issues.apache.org/jira/browse/SOLR-14630 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: SolrCloud, SolrJ > Affects Versions: 8.5.1, 8.5.2 > Reporter: Ivan Djurasevic > Priority: Major > > Precondition: create collection with 4 shards on one server. > During search and update, solr cloud client picks wrong core even _route_ > exists in query param. In BaseSolrClient class, method sendRequest, > {quote}{{sortedReplicas.forEach( replica -> {}} > {{ if (seenNodes.add(replica.getNodeName()))}}{{{ > theUrlList.add(ZkCoreNodeProps.getCoreUrl(replica.getBaseUrl(), > joinedInputCollections)); }}}{{});}}{quote} > Previous part of code adds base url(localhost:8983/solr/collection_name) to > theUrlList, it doesn't create core address(localhost:8983/core_name). If we > change previous code to: > {quote}sortedReplicas.forEach(replica -> { > if (seenNodes.add(replica.getNodeName()) > { theUrlList.add(replica.getCoreUrl()); } > }); > {quote} > Solr cloud client picks core which is defined with _route_ parameter. > > -- 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