nick-boss-tech commented on code in PR #5202:
URL: https://github.com/apache/solr/pull/5202#discussion_r4364990942
##########
solr/core/src/java/org/apache/solr/api/V2HttpCall.java:
##########
@@ -132,9 +132,8 @@ public void call(SolrQueryRequest req, SolrQueryResponse
rsp) {
if (pathSegments.size() > 1 && ("c".equals(prefix) ||
"collections".equals(prefix))) {
origCorename = pathSegments.get(1);
- String collectionStr = queryParams.get(COLLECTION_PROP, origCorename);
- collectionsList =
- resolveCollectionListOrAlias(collectionStr); // &collection= takes
precedence
+ String collectionStr = origCorename;
Review Comment:
🤖 *AI text below* 🤖 *(reviewed by Nick Shanin)*
The rename to `coreOrCollection` is in
[1c0a942ff8](https://github.com/nick-boss-tech/solr/commit/1c0a942ff8669aa1c4f4a1a4b06198eb66b7c58a).
It covers the field in `HttpSolrCall` and its uses in `V2HttpCall`, with no
behavior change.
##########
solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java:
##########
@@ -1538,16 +1538,20 @@ private void testMultipleCollections() throws Exception
{
.getNumFound();
SolrQuery query = new SolrQuery("*:*");
- query.set("collection", "collection2,collection3");
- long found = clients.get(0).query(query).getResults().getNumFound();
+ long found = clients.get(0).query("collection2,collection3",
query).getResults().getNumFound();
Review Comment:
🤖 *AI text below* 🤖 *(reviewed by Nick Shanin)*
Yes, v1 distributed queries already support comma-separated collections or
an alias in the path. Jan describes both on SOLR-18446, and David confirms that
comma-delimited support came from the time-routed-alias work and should stay.
This PR keeps that support; the `collection` parameter can narrow the path's
collections but cannot override them.
##########
solr/solr-ref-guide/modules/deployment-guide/pages/solrcloud-distributed-requests.adoc:
##########
@@ -276,12 +276,15 @@ Note that if you provide these parameters in a query
string, they need to be pro
=== collection Parameter
-The `collection` parameter allows you to specify a collection or a number of
collections on which the query should be executed.
-This allows you to query multiple collections at once and the features of Solr
which work in a distributed manner will work across collections.
+The collection named in the URL path governs which collections a query runs
against.
+To query several collections at once, name them in the path, as a
comma-separated list or through an alias; the features of Solr which work in a
distributed manner will work across those collections.
+
+The `collection` parameter can only narrow the set named in the path.
Review Comment:
🤖 *AI text below* 🤖 *(reviewed by Nick Shanin)*
Neither dropped nor deprecated. The parameter no longer selects collections
on its own; it can only narrow the set named in the path. The page now
documents that narrower role, and the example is corrected to show narrowing:
`/solr/collection1,collection2,collection3/select?collection=collection2`.
##########
solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-11.adoc:
##########
@@ -41,3 +41,10 @@ bin/solr start -Dsolr.node.roles=data:on,overseer:preferred
A node started this way asks the Overseer to re-run its node prioritization,
so a preferred node takes over without waiting for the current Overseer to
restart.
Note that node roles are fixed for the lifetime of a node: unlike `ADDROLE`,
they cannot be changed on a running node.
+
+=== `collection` Parameter No Longer Routes Requests
Review Comment:
🤖 *AI text below* 🤖 *(reviewed by Nick Shanin)*
It is optional, but still useful for narrowing a v1 request whose path names
several collections or an alias. For example,
`/solr/collection1,collection2/select?collection=collection2` selects only
`collection2`. The entry means the parameter can no longer override the path,
rather than that it has been removed.
--
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]