> for an example.
If you have started Solr with one of the supplied xref:configuration-guide:config-sets.adoc[example configsets], you may already have the `ExtractingRequestHandler` configured by default.
-First, you must enable the xref:#module[Module].
-If `solrconfig.xml` is not already configured, you will need to modify it to find the `ExtractingRequestHandler` and its dependencies:
-
-[source,xml]
-----
-
-----
+First, the `extraction` xref:#module[module] must be enabled.
+This can be done by specifying the environment variable `SOLR_MODULES=extraction` in your startup configuration.
You can then configure the `ExtractingRequestHandler` in `solrconfig.xml`.
The following is the default configuration found in Solr's `sample_techproducts_configs` configset, which you can modify as needed:
diff --git a/solr/solr-ref-guide/modules/query-guide/pages/learning-to-rank.adoc b/solr/solr-ref-guide/modules/query-guide/pages/learning-to-rank.adoc
index 1d3f575ba03..fcdf78e6315 100644
--- a/solr/solr-ref-guide/modules/query-guide/pages/learning-to-rank.adoc
+++ b/solr/solr-ref-guide/modules/query-guide/pages/learning-to-rank.adoc
@@ -111,10 +111,6 @@ In the form of JSON files your trained model or models (e.g., different models f
|(custom) |(custom class extending {solr-javadocs}/modules/ltr/org/apache/solr/ltr/model/LTRScoringModel.html[LTRScoringModel]) |(not applicable)
|===
-== Module
-
-This is provided via the `ltr` xref:configuration-guide:solr-modules.adoc[Solr Module] that needs to be enabled before use.
-
== Installation of LTR
The ltr module requires the `modules/ltr/lib/solr-ltr-*.jar` JARs.
@@ -125,13 +121,8 @@ Learning-To-Rank is a module and therefore its plugins must be configured in `so
=== Minimum Requirements
-* Include the required module JARs.
-Note that by default paths are relative to the Solr core, so they may need adjustments to your configuration, or an explicit specification of the `$solr.install.dir`.
-+
-[source,xml]
-----
-
-----
+* Enable the `ltr` module to make the LTR classes available on Solr's classpath.
+See xref:configuration-guide:solr-modules.adoc[Solr Module] for more details.
* Declaration of the `ltr` query parser.
+
@@ -248,11 +239,11 @@ Assuming that you consider to use a large model placed at `/path/to/models/myMod
}
----
-First, add the directory to Solr's resource paths with a xref:configuration-guide:libs.adoc#lib-directives-in-solrconfig[`` directive]:
+First, add the directory to Solr's resource paths with a xref:configuration-guide:configuring-solr-xml.adoc#the-solr-element[solr.xml `` directive]:
[source,xml]
----
-
+ /path/to/models"
----
Then, configure `DefaultWrapperModel` to wrap `myModel.json`:
@@ -273,8 +264,6 @@ Then, configure `DefaultWrapperModel` to wrap `myModel.json`:
NOTE: No `"features"` are configured in `myWrapperModel` because the features of the wrapped model (`myModel`) will be used; also note that the `"store"` configured for the wrapper model must match that of the wrapped model i.e., in this example the feature store called `largeModelsFeatureStore` is used.
-CAUTION: `` doesn't work as expected in this case, because `SolrResourceLoader` considers given resources as JAR if `` indicates files.
-
As an alternative to the above-described `DefaultWrapperModel`, it is possible to xref:deployment-guide:zookeeper-ensemble.adoc#increasing-the-file-size-limit[increase ZooKeeper's file size limit].
=== Applying Changes
diff --git a/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc b/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc
index ba91a442edc..09beabda54a 100644
--- a/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc
+++ b/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc
@@ -41,10 +41,10 @@ Some key changes that you may run into are:
* You may use `--zk-host` (or `-z`) in place of the `--solr-url` option to lookup the Solr host.
* Basic Authentication support has been added to bin/solr via the `--credentials` (or `-u`) option.
* Some short and single-letter options have been removed to avoid conflicts or in favor to other options.
-
+
To learn about the updated options in each CLI tool, use the `--help` option or look up the tool in the documentation.
-Additionally, the `bin/solr delete` command no longer deletes a configset when you delete a collection. Previously if you deleted a collection, it would also delete it's associated configset if it was the only user of it.
+Additionally, the `bin/solr delete` command no longer deletes a configset when you delete a collection. Previously if you deleted a collection, it would also delete it's associated configset if it was the only user of it.
Now you have to explicitly provide a `--delete-config` option to delete the configsets. This decouples the lifecycle of a configset from that of a collection.
=== SolrJ
@@ -60,6 +60,12 @@ Users who previously relied on collection-specific URLs to avoid including the c
The service installer now installs a `systemd` startup script instead of an `init.d` startup script. It is up to the user to uninstall any existing `init.d` script when upgrading.
+=== SolrCloud request routing
+
+HTTP requests to SolrCloud that are for a specific core must be delivered to the node with that core, or else an HTTP 404 Not Found response will occur.
+Previously, SolrCloud would try too hard scanning the cluster's state to look for it and internally route/proxy it.
+If only one node is exposed to a client, and if the client uses the bin/solr export tool, it probably won't work.
+
=== Deprecation removals
* The `jaegertracer-configurator` module, which was deprecated in 9.2, is removed. Users should migrate to the `opentelemetry` module.
@@ -79,11 +85,17 @@ has been removed. Please use `-Dsolr.hiddenSysProps` or the envVar `SOLR_HIDDEN_
* The legacy Circuit Breaker named `CircuitBreakerManager`, is removed. Please use individual Circuit Breaker plugins instead.
-* The `BlobRepository`, which was deprecated in 8x in favour of the `FileStore` approach is removed.
+* The `BlobRepository`, which was deprecated in 8x in favour of the `FileStore` approach is removed.
Users should migrate to the `FileStore` implementation (per node stored file) and the still existing `BlobHandler` (across the cluster storage backed by `.system` collection).
Please note this also removes the ability to share resource intensive objects across multiple cores as this feature was tied to the `BlobRepository` implementation.
* The language specific Response Writers, which were deprecated in 9.8 in favour of more widely used formats like JSON have been removed.
The removed writer types (invoked as part of the `wt` parameter) include `python`, `ruby`, `php`, and `phps`.
+* The deprecated support for configuring replication using master/slave terminology is removed. Use leader/follower.
+
+* Support for the `` directive, which historically could be used in solrconfig.xml to add JARs on a core-by-core basis, was deprecated in 9.8 and has now been removed.
+Users that need to vary JAR accessibility on a per-core basis can use Solr's xref:configuration-guide:package-manager.adoc[Package Manager].
+Users who that don't need to vary JAR access on a per-core basis have several options, including the xref:configuration-guide:configuring-solr-xml.adoc[`` tag supported by solr.xml] or manipulation of Solr's classpath prior to JVM startup.
+
* Kerberos based authentication has been removed. This results in changes to SolrJ, the Solr Admin app, and the removal of the `hadoop-auth` module.
diff --git a/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-9.adoc b/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-9.adoc
index cf91beee4cb..fa08dc0d287 100644
--- a/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-9.adoc
+++ b/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-9.adoc
@@ -380,7 +380,7 @@ Other relevant placement strategies should be used instead, such as autoscaling
** The `solrj-deps` (SolrJ Dependencies) are no longer separated out from the other Server jars.
** Please refer to the SolrJ Maven artifact to see the exact dependencies you need to include from `server/solr-webapp/webapp/WEB-INF/lib/` and `server/lib/ext/` if you are loading in SolrJ manually.
If you plan on using SolrJ as a JDBC driver, please refer to the xref:query-guide:sql-query.adoc#generic-clients[JDBC documentation]
-** More information can be found in the xref:configuration-guide:libs.adoc#lib-directives-in-solrconfig[Libs documentation].
+** More information can be found in the xref:configuration-guide:libs.adoc[Libs documentation].
* SolrJ class `CloudSolrClient` now supports HTTP2. It has a new Builder. See `CloudLegacySolrClient` for the 8.x version of this class.
* In Backup request responses, the `response` key now uses a map to return information instead of a list. This is only applicable for users returning information in JSON format, which is the default behavior.
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java
index 19bfc2565d6..22e1005ed8b 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java
@@ -34,7 +34,6 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Consumer;
import java.util.function.Function;
-import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.apache.solr.common.MapWriter;
import org.apache.solr.common.SolrException;
@@ -53,6 +52,8 @@
* Immutable state of the cloud. Normally you can get the state by using {@code
* ZkStateReader#getClusterState()}.
*
+ * However, the {@link #setLiveNodes list of live nodes} is updated when nodes go up and down.
+ *
* @lucene.experimental
*/
public class ClusterState implements MapWriter {
@@ -63,8 +64,7 @@ public class ClusterState implements MapWriter {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private final Map collectionStates, immutableCollectionStates;
- private Set liveNodes;
- private Set hostAllowList;
+ private volatile Set liveNodes;
/** Use this constr when ClusterState is meant for consumption. */
public ClusterState(Set liveNodes, Map collectionStates) {
@@ -85,8 +85,7 @@ private static Map getRefMap(Map c
* loaded (parameter order different from constructor above to have different erasures)
*/
public ClusterState(Map collectionStates, Set liveNodes) {
- this.liveNodes = CollectionUtil.newHashSet(liveNodes.size());
- this.liveNodes.addAll(liveNodes);
+ setLiveNodes(liveNodes);
this.collectionStates = new LinkedHashMap<>(collectionStates);
this.immutableCollectionStates = Collections.unmodifiableMap(this.collectionStates);
}
@@ -189,7 +188,7 @@ public Map getCollectionsMap() {
/** Get names of the currently live nodes. */
public Set getLiveNodes() {
- return Collections.unmodifiableSet(liveNodes);
+ return liveNodes;
}
@Deprecated
@@ -387,7 +386,7 @@ public boolean equals(Object obj) {
/** Internal API used only by ZkStateReader */
void setLiveNodes(Set liveNodes) {
- this.liveNodes = liveNodes;
+ this.liveNodes = Set.copyOf(liveNodes);
}
/**
@@ -401,20 +400,6 @@ public Map getCollectionStates() {
return immutableCollectionStates;
}
- /**
- * Gets the set of allowed hosts (host:port) built from the set of live nodes. The set is cached
- * to be reused.
- */
- public Set getHostAllowList() {
- if (hostAllowList == null) {
- hostAllowList =
- getLiveNodes().stream()
- .map((liveNode) -> liveNode.substring(0, liveNode.indexOf('_')))
- .collect(Collectors.toSet());
- }
- return hostAllowList;
- }
-
/**
* Streams the resolved {@link DocCollection}s, which will often fetch from ZooKeeper for each one
* for a many-collection scenario. Use this sparingly; some users have thousands of collections!
diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractBasicDistributedZk2TestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractBasicDistributedZk2TestBase.java
index 513596533ff..1ac793e852d 100644
--- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractBasicDistributedZk2TestBase.java
+++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractBasicDistributedZk2TestBase.java
@@ -204,25 +204,13 @@ private void addAndQueryDocs(final String baseUrl, int docs) throws Exception {
SolrQuery query = new SolrQuery("*:*");
- String collectionUrl = baseUrl + "/onenodecollection" + "core";
- try (SolrClient client = getHttpSolrClient(baseUrl, "onenodecollectioncore")) {
-
- // it might take a moment for the proxy node to see us in their cloud state
- waitForNon403or404or503(client, collectionUrl);
-
+ try (SolrClient client = getHttpSolrClient(baseUrl, "onenodecollection")) {
// add a doc
- SolrInputDocument doc = new SolrInputDocument();
- doc.addField("id", docs);
- client.add(doc);
+ client.add(sdoc("id", docs));
client.commit();
QueryResponse results = client.query(query);
assertEquals(docs - 1, results.getResults().getNumFound());
- }
-
- try (SolrClient client = getHttpSolrClient(baseUrl, "onenodecollection")) {
- QueryResponse results = client.query(query);
- assertEquals(docs - 1, results.getResults().getNumFound());
SolrInputDocument doc = new SolrInputDocument();
doc.addField("id", docs + 1);