Apache Solr open-source search software
SOLR-15916: Remove dist/ from the distribution (#526)
Houston Putmane5c3a976a090
diff --git a/gradle/solr/packaging.gradle b/gradle/solr/packaging.gradleindex fb5af178e50..8402725ca03 100644--- a/gradle/solr/packaging.gradle+++ b/gradle/solr/packaging.gradle@@ -60,6 +60,10 @@ configure(allprojects.findAll {project -> project.path.startsWith(":solr:contrib// An aggregate that configures lib and test-lib in a temporary location.task assemblePackaging(type: Sync) {from "README.md"++ from (tasks.jar, {+ into "lib"+ })from ({def externalLibs = configurations.runtimeLibs.copyRecursive { dep ->diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 15c6f97f17c..336ca023a57 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -512,6 +512,9 @@ Other Changes* SOLR-15934: CloseHook is now an interface with default method implementations instead of an abstract class. (Mike Drob)+* SOLR-15916: Remove dist/ from the binary release. The solr-core and solrj jars will be included in the server WEB-INF/lib directory,+and each individual module's jar will be included in its directory's lib/ folder. (Houston Putman)+Bug Fixes---------------------* SOLR-15849: Fix the connection reset problem caused by the incorrect use of 4LW with \n when monitoring zooKeeper status (Fa Ming).diff --git a/solr/README.md b/solr/README.mdindex e675ada8172..0fb2f6206e6 100644--- a/solr/README.md+++ b/solr/README.md@@ -141,18 +141,26 @@ server/configuration and documents to index. Please see: bin/solr start -helpfor more information about starting a Solr server.+bin/+ Scripts to startup, manage and interact with Solr instances.+example/Contains example documents and an alternative Solr homedirectory containing various examples.-dist/solr-<component>-XX.jar- The Apache Solr libraries. To compile Apache Solr Plugins,- one or more of these will be required. The core library is- required at a minimum. (see https://solr.apache.org/guide/solr-plugins.html- for more information).+contrib/+ Contains modules to extend the functionality of Solr.+ Libraries for these modules can be found under contrib/*/lib++docker/+ Contains a docker file to build a Docker image using the source binary distribution.+ docker/scripts contains scripts that the docker image uses to manage Solr.docs/index.htmlA link to the online version of Apache Solr Javadoc API documentation and Tutorial++licenses/+ Licenses, notice files and signatures for Solr dependencies.```Instructions for Building Apache Solr from Sourcediff --git a/solr/bin/postlogs b/solr/bin/postlogsindex 8925dd63464..b08d8d556ec 100755--- a/solr/bin/postlogs+++ b/solr/bin/postlogs@@ -1,3 +1,4 @@+#!/usr/bin/env bash# Licensed to the Apache Software Foundation (ASF) under one or more# contributor license agreements. See the NOTICE file distributed with# this work for additional information regarding copyright ownership.@@ -30,4 +31,8 @@#############################################################################################-java -classpath dist/*:dist/solrj-lib/*: org.apache.solr.util.SolrLogPostTool $1 $2++SOLR_TIP=`dirname "$THIS_SCRIPT"`/..+SOLR_TIP=`cd "$SOLR_TIP"; pwd`++java -classpath "$SOLR_TIP/server/lib/ext/*:$SOLR_TIP/server/solr-webapp/webapp/WEB-INF/lib/*" org.apache.solr.util.SolrLogPostTool $1 $2diff --git a/solr/contrib/analysis-extras/README.md b/solr/contrib/analysis-extras/README.mdindex 88950fc9710..298f3160145 100644--- a/solr/contrib/analysis-extras/README.md+++ b/solr/contrib/analysis-extras/README.md@@ -9,7 +9,7 @@ analyzers for Chinese and Polish, and integration withOpenNLP for multilingual tokenization, part-of-speech tagginglemmatization, phrase chunking, and named-entity recognition.-Each of the jars below relies upon including `/dist/solr-analysis-extras-X.Y.jar`+Each of the jars below relies upon including `/contrib/analysis-extras/lib/solr-analysis-extras-X.Y.Z.jar`in the `solrconfig.xml`* ICU relies upon `lib/lucene-analyzers-icu-X.Y.jar`diff --git a/solr/contrib/prometheus-exporter/bin/solr-exporter b/solr/contrib/prometheus-exporter/bin/solr-exporterindex 872925fac7a..c43788cd4bf 100755--- a/solr/contrib/prometheus-exporter/bin/solr-exporter+++ b/solr/contrib/prometheus-exporter/bin/solr-exporter@@ -73,16 +73,7 @@ thenREPO="$BASEDIR"/libfi-CLASSPATH=$CLASSPATH_PREFIX:"$BASEDIR/conf":"$REPO/*":"$BASEDIR/../../dist/solrj-lib/*"-for JAR in $(find "$BASEDIR"/../../dist -name 'solr-solrj-*.jar')-do- CLASSPATH="$CLASSPATH":"$JAR"-done-for JAR in $(find "$BASEDIR"/../../dist -name 'solr-prometheus-exporter-*.jar')-do- CLASSPATH="$CLASSPATH":"$JAR"-done-CLASSPATH="$CLASSPATH":"$BASEDIR/../../server/solr-webapp/webapp/WEB-INF/lib/*":"$BASEDIR/../../server/lib/ext/*"+CLASSPATH=$CLASSPATH_PREFIX:"$BASEDIR/conf":"$REPO/*":"$BASEDIR/../../server/solr-webapp/webapp/WEB-INF/lib/*":"$BASEDIR/../../server/lib/ext/*"# Memory settingsJAVA_MEM_OPTS=diff --git a/solr/contrib/prometheus-exporter/bin/solr-exporter.cmd b/solr/contrib/prometheus-exporter/bin/solr-exporter.cmdindex 113306a84ee..a16681c0bbc 100644--- a/solr/contrib/prometheus-exporter/bin/solr-exporter.cmd+++ b/solr/contrib/prometheus-exporter/bin/solr-exporter.cmd@@ -71,7 +71,7 @@ if "%JAVACMD%"=="" set JAVACMD=javaif "%REPO%"=="" set REPO=%BASEDIR%\lib-set CLASSPATH=%REPO%\*;%BASEDIR%\conf;%BASEDIR%\..\..\dist\solrj-lib\*;%BASEDIR%\..\..\dist\*;%BASEDIR%\..\..\server\lib\ext\*+set CLASSPATH=%REPO%\*;%BASEDIR%\conf;%BASEDIR%\..\..\server\lib\ext\*;%BASEDIR%\..\..\server\solr-webapp\webapp\WEB-INF\lib\*@REM Convert Environment Variables to Command Line Optionsset EXPORTER_ARGS=diff --git a/solr/core/src/test-files/solr/configsets/upload/with-lib-directive/solrconfig.xml b/solr/core/src/test-files/solr/configsets/upload/with-lib-directive/solrconfig.xmlindex bb875e319c8..0de065014e6 100644--- a/solr/core/src/test-files/solr/configsets/upload/with-lib-directive/solrconfig.xml+++ b/solr/core/src/test-files/solr/configsets/upload/with-lib-directive/solrconfig.xml@@ -37,7 +37,7 @@<luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>- <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-ltr-\d.*\.jar" />+ <lib dir="${solr.install.dir:../../../..}/contrib/ltr/lib/" regex=".*\.jar" /><requestHandler name="/select" class="solr.SearchHandler"><lst name="defaults">diff --git a/solr/docker/templates/Dockerfile.body.template b/solr/docker/templates/Dockerfile.body.templateindex 19e84776083..df215f17697 100644--- a/solr/docker/templates/Dockerfile.body.template+++ b/solr/docker/templates/Dockerfile.body.template@@ -29,7 +29,7 @@# add symlink to /opt/solr, remove what we don't wantRUN set -ex; \(cd /opt; ln -s solr-*/ solr); \- rm -Rf /opt/solr/docs /opt/solr/dist/solr-solrj-*.jar /opt/solr/dist/solrj-lib /opt/solr/dist/solr-core-*.jar;+ rm -Rf /opt/solr/docs;LABEL maintainer="The Apache Solr Project"LABEL url="https://solr.apache.org"diff --git a/solr/packaging/build.gradle b/solr/packaging/build.gradleindex 0cbe02ee620..33ffc0171d8 100644--- a/solr/packaging/build.gradle+++ b/solr/packaging/build.gradle@@ -31,10 +31,6 @@ ext {}configurations {- distSolr {- transitive = false- }- distSolrjcontribexampleserver@@ -51,8 +47,6 @@ artifacts {}dependencies {- distSolrj project(":solr:solrj")-[":solr:contrib:analysis-extras",":solr:contrib:analytics",":solr:contrib:extraction",@@ -65,14 +59,9 @@ dependencies {":solr:contrib:s3-repository",":solr:contrib:scripting"].each { contribName ->- distSolr project(contribName)contrib project(path: contribName, configuration: "packaging")}- distSolr project(":solr:core")- distSolr project(":solr:server")- distSolr project(":solr:solrj")-example project(path: ":solr:example", configuration: "packaging")server project(path: ":solr:server", configuration: "packaging")@@ -109,14 +98,6 @@ distributions {into "contrib"})- from(configurations.distSolr, {- into "dist"- })-- from(configurations.distSolrj - configurations.distSolr, {- into "dist/solrj-lib"- })-from(configurations.example, {into "example"})diff --git a/solr/server/solr/configsets/_default/conf/solrconfig.xml b/solr/server/solr/configsets/_default/conf/solrconfig.xmlindex ce191525607..24be78d7841 100644--- a/solr/server/solr/configsets/_default/conf/solrconfig.xml+++ b/solr/server/solr/configsets/_default/conf/solrconfig.xml@@ -72,7 +72,7 @@The example below can be used to load a solr-contrib alongwith their external dependencies.-->- <!-- <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-ltr-\d.*\.jar" /> -->+ <!-- <lib dir="${solr.install.dir:../../../..}/contrib/ltr/lib" regex=".*\.jar" /> --><!-- an exact 'path' can be used instead of a 'dir' to specify aspecific jar file. This will cause a serious error to be loggeddiff --git a/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml b/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xmlindex 7bbed362b53..6876b508e2e 100644--- a/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml+++ b/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml@@ -73,17 +73,14 @@with their external dependencies.--><lib dir="${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar" />- <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-extraction-\d.*\.jar" /><lib dir="${solr.install.dir:../../../..}/contrib/clustering/lib/" regex=".*\.jar" />- <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-clustering-\d.*\.jar" /><lib dir="${solr.install.dir:../../../..}/contrib/langid/lib/" regex=".*\.jar" />- <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-langid-\d.*\.jar" />- <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-ltr-\d.*\.jar" />+ <lib dir="${solr.install.dir:../../../..}/contrib/ltr/lib/" regex=".*\.jar" />- <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-scripting-\d.*\.jar" />+ <lib dir="${solr.install.dir:../../../..}/contrib/scripting/lib/" regex=".*\.jar" /><!-- an exact 'path' can be used instead of a 'dir' to specify aspecific jar file. This will cause a serious error to be loggeddiff --git a/solr/solr-ref-guide/build.gradle b/solr/solr-ref-guide/build.gradleindex abf8aa2dc69..3466a7c15be 100644--- a/solr/solr-ref-guide/build.gradle+++ b/solr/solr-ref-guide/build.gradle@@ -175,6 +175,7 @@ ext {solrRootPath : project(':solr').projectDir.toString() + File.separator,solrDocsVersion : project.ext['solrDocsVersion'],solrGuideVersionPath : project.ext['solrGuideVersionPath'],+ solrFullVersion: project.version,buildDate : rootProject.ext['buildDate'],buildYear : rootProject.ext['buildYear'],* : details.props,diff --git a/solr/solr-ref-guide/src/_config.yml.template b/solr/solr-ref-guide/src/_config.yml.templateindex 45c80d22003..08f869b772b 100755--- a/solr/solr-ref-guide/src/_config.yml.template+++ b/solr/solr-ref-guide/src/_config.yml.template@@ -69,6 +69,7 @@ asciidoc: {}# them to the <asciidoctor:convert/> ant task for precommit validation as well.solr-attributes: &solr-attributes-refsolr-root-path: '${solrRootPath}'+ solr-full-version: '${solrFullVersion}'solr-guide-draft-status: '${solrGuideDraftStatus}'solr-guide-version-path: '${solrGuideVersionPath}'solr-docs-version: '${solrDocsVersion}'diff --git a/solr/solr-ref-guide/src/analytics.adoc b/solr/solr-ref-guide/src/analytics.adocindex 2e79e9de668..ee21d72729d 100644--- a/solr/solr-ref-guide/src/analytics.adoc+++ b/solr/solr-ref-guide/src/analytics.adoc@@ -34,7 +34,7 @@ The Analytics Handler should not be used by users to submit analytics requests.To use the Analytics Component, the first step is to install this contrib module's plugins into Solr -- see the <<solr-plugins.adoc#installing-plugins,Solr Plugins>> section on how to do this.Note: Method with `<lib/>` directive doesn't work.-Instead copy `${solr.install.dir}/dist/solr-analytics-x.x.x.jar` to `${solr.install.dir}/server/solr-webapp/webapp/WEB-INF/lib/`, as described in the <<libs.adoc#lib-directories,lib directories documentation>>.+Instead copy `${solr.install.dir}/contrib/analytics/lib/solr-analytics-x.x.x.jar` to `${solr.install.dir}/server/solr-webapp/webapp/WEB-INF/lib/`, as described in the <<libs.adoc#lib-directories,lib directories documentation>>.Next you need to register the request handler and search component.Add the following lines to `solrconfig.xml`, near the defintions for other request handlers:diff --git a/solr/solr-ref-guide/src/docker-networking.adoc b/solr/solr-ref-guide/src/docker-networking.adocindex e8d7c95ad57..68a6931c160 100644--- a/solr/solr-ref-guide/src/docker-networking.adoc+++ b/solr/solr-ref-guide/src/docker-networking.adoc@@ -205,7 +205,7 @@ To load data, and see it was split over shards:[source,bash]----docker exec -it --user=solr zksolr1 bin/post -c my_collection1 example/exampledocs/manufacturers.xml-# /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -classpath /opt/solr/dist/solr-core-9.0.0.jar -Dauto=yes -Dc=my_collection1 -Ddata=files org.apache.solr.util.SimplePostTool example/exampledocs/manufacturers.xml+# /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -classpath /opt/solr/server/lib/ext/*:/opt/solr/server/solr-webapp/webapp/WEB-INF/lib/* -Dauto=yes -Dc=my_collection1 -Ddata=files org.apache.solr.util.SimplePostTool example/exampledocs/manufacturers.xml# SimplePostTool version 9.0.0# Posting files to [base] url http://localhost:8983/solr/my_collection1/update...# Entering auto mode. File endings considered are xml,json,csv,pdf,doc,docx,ppt,pptx,xls,xlsx,odt,odp,ods,ott,otp,ots,rtf,htm,html,txt,logdiff --git a/solr/solr-ref-guide/src/indexing-with-tika.adoc b/solr/solr-ref-guide/src/indexing-with-tika.adocindex a73e895d18b..e6279453733 100644--- a/solr/solr-ref-guide/src/indexing-with-tika.adoc+++ b/solr/solr-ref-guide/src/indexing-with-tika.adoc@@ -412,7 +412,6 @@ If it is not already configured, you will need to configure `solrconfig.xml` to[source,xml]----<lib dir="${solr.install.dir:../../..}/contrib/extraction/lib" regex=".*\.jar" />- <lib dir="${solr.install.dir:../../..}/dist/" regex="solr-cell-\d.*\.jar" />----You can then configure the `ExtractingRequestHandler` in `solrconfig.xml`.diff --git a/solr/solr-ref-guide/src/indexing-with-update-handlers.adoc b/solr/solr-ref-guide/src/indexing-with-update-handlers.adocindex 0ac0d32b5f9..8cd3d6823d4 100644--- a/solr/solr-ref-guide/src/indexing-with-update-handlers.adoc+++ b/solr/solr-ref-guide/src/indexing-with-update-handlers.adoc@@ -277,7 +277,7 @@ The status field will be non-zero in case of failure.The Scripting contrib module provides a separate XSLT Update Request Handler that allows you to index any arbitrary XML by using the `<tr>` parameter to apply an https://en.wikipedia.org/wiki/XSLT[XSL transformation].You must have an XSLT stylesheet in the `conf/xslt` directory of your <<config-sets.adoc#,configset>> that can transform the incoming data to the expected `<add><doc/></add>` format, and use the `tr` parameter to specify the name of that stylesheet.-Learn more about adding the `dist/solr-scripting-*.jar` file into Solr's <<libs.adoc#lib-directories,Lib Directories>>.+Learn more about adding the `contrib/scripting/lib/*` files into Solr's <<libs.adoc#lib-directories,Lib Directories>>.=== tr Parameterdiff --git a/solr/solr-ref-guide/src/indexupgrader-tool.adoc b/solr/solr-ref-guide/src/indexupgrader-tool.adocindex b9b8f61ff3f..3edffb1d023 100644--- a/solr/solr-ref-guide/src/indexupgrader-tool.adoc+++ b/solr/solr-ref-guide/src/indexupgrader-tool.adoc@@ -36,7 +36,7 @@ You will need to include the `lucene-core-<version>.jar` and `lucene-backwards-c[source,bash,subs="attributes"]-----java -cp lucene-core-{solr-docs-version}.0.jar:lucene-backward-codecs-{solr-docs-version}.0.jar org.apache.lucene.index.IndexUpgrader [-delete-prior-commits] [-verbose] /path/to/index+java -cp lucene-core-{solr-full-version}.jar:lucene-backward-codecs-{solr-full-version}.jar org.apache.lucene.index.IndexUpgrader [-delete-prior-commits] [-verbose] /path/to/index----This tool keeps only the last commit in an index.diff --git a/solr/solr-ref-guide/src/installing-solr.adoc b/solr/solr-ref-guide/src/installing-solr.adocindex b069502388f..2c582337e7d 100644--- a/solr/solr-ref-guide/src/installing-solr.adoc+++ b/solr/solr-ref-guide/src/installing-solr.adoc@@ -93,9 +93,6 @@ It is described in more detail in the section <<taking-solr-to-production.adoc#,contrib/::Solr's `contrib` directory includes add-on plugins for specialized features of Solr.-dist/::-The `dist` directory contains the main Solr .jar files.-docs/::The `docs` directory includes a link to online Javadocs for Solr.@@ -109,7 +106,7 @@ The `licenses` directory includes all of the licenses for 3rd party libraries usserver/::This directory is where the heart of the Solr application resides.A README in this directory provides a detailed overview, but here are some highlights:-* Solr's Admin UI (`server/solr-webapp`)+* Solr's Admin UI & JAR files (`server/solr-webapp`)* Jetty libraries (`server/lib`)* Log files (`server/logs`) and log configurations (`server/resources`).See the section <<configuring-logging.adoc#,Configuring Logging>> for more details on how to customize Solr's default logging.diff --git a/solr/solr-ref-guide/src/jdbc-dbvisualizer.adoc b/solr/solr-ref-guide/src/jdbc-dbvisualizer.adocindex fba53e8e4a5..7686c117673 100644--- a/solr/solr-ref-guide/src/jdbc-dbvisualizer.adoc+++ b/solr/solr-ref-guide/src/jdbc-dbvisualizer.adoc@@ -19,11 +19,8 @@Solr's JDBC driver supports https://www.dbvis.com/[DbVisualizer] for querying Solr.For DbVisualizer, you will need to create a new driver for Solr using the DbVisualizer Driver Manager.-This will add several SolrJ client .jars to the DbVisualizer classpath.-The files required are:--* all .jars found in `$SOLR_HOME/dist/solrj-lib`-* the SolrJ .jar found at `$SOLR_HOME/dist/solr-solrj-<version>.jar`+This will add several SolrJ client (and dependency) `.jar` s to the DbVisualizer classpath.+<<#add-driver-files-to-classpath,See below>> for the required files.Once the driver has been created, you can create a connection to Solr with the connection string format outlined in the generic section and use the SQL Commander to issue queries.@@ -45,7 +42,7 @@ image::images/jdbc-dbvisualizer/dbvisualizer_solrjdbc_2.png[image,width=532,heigProvide a name for the driver, and provide the URL format: `jdbc:solr://<zk_connection_string>/?collection=<collection>`.Do not fill in values for the variables "```zk_connection_string```" and "```collection```", those will be provided later when the connection to Solr is configured.-The Driver Class will also be automatically added when the driver .jars are added.+The Driver Class will also be automatically added when the driver `.jar` s are added.image::images/jdbc-dbvisualizer/dbvisualizer_solrjdbc_3.png[image,width=532,height=400]@@ -54,8 +51,10 @@ image::images/jdbc-dbvisualizer/dbvisualizer_solrjdbc_3.png[image,width=532,heigThe driver files to be added are:-* all .jars in `$SOLR_HOME/dist/solrj-lib`-* the SolrJ .jar found in `$SOLR_HOME/dist/solr-solrj-<version>.jar`+* SolrJ dependency `.jar` s found in `$SOLR_TIP/server/solr-webapp/webapp/WEB-INF/lib/\*` and `$SOLR_TIP/server/lib/ext/*`.+In the Solr distribution these dependencies are not separated from Solr's dependencies, so you must include all or manually choose the exact set that is needed.+Please refer to the https://search.maven.org/artifact/org.apache.solr/solr-solrj/{solr-full-version}/jar[maven release] for the exact dependencies needed for your version.+* The SolrJ `.jar` found at `$SOLR_TIP/server/solr-webapp/webapp/WEB-INF/lib/solr-solrj-<version>.jar`image::images/jdbc-dbvisualizer/dbvisualizer_solrjdbc_4.png[image,width=535,height=400]diff --git a/solr/solr-ref-guide/src/jdbc-python-jython.adoc b/solr/solr-ref-guide/src/jdbc-python-jython.adocindex a432deec70d..ee9a6dedaa6 100644--- a/solr/solr-ref-guide/src/jdbc-python-jython.adoc+++ b/solr/solr-ref-guide/src/jdbc-python-jython.adoc@@ -34,7 +34,7 @@ The CLASSPATH variable must be configured to contain the `solr-solrj` jar and thpip install JayDeBeApi-export CLASSPATH="$(echo $(ls /opt/solr/dist/solr-solrj* /opt/solr/dist/solrj-lib/*) | tr ' ' ':')"+export CLASSPATH="/opt/solr/server/lib/ext/*:/opt/solr/server/solr-webapp/webapp/WEB-INF/lib/*"python solr_jaydebeapi.py----@@ -74,7 +74,7 @@ The CLASSPATH variable must be configured to contain the solr-solrj jar and the#!/usr/bin/env bash# Java and Jython must already be installed-export CLASSPATH="$(echo $(ls /opt/solr/dist/solr-solrj* /opt/solr/dist/solrj-lib/*) | tr ' ' ':')"+export CLASSPATH="/opt/solr/server/lib/ext/*:/opt/solr/server/solr-webapp/webapp/WEB-INF/lib/*"jython [solr_java_native.py | solr_zxjdbc.py]----diff --git a/solr/solr-ref-guide/src/jdbc-r.adoc b/solr/solr-ref-guide/src/jdbc-r.adocindex 4305e99a008..baae5a13493 100644--- a/solr/solr-ref-guide/src/jdbc-r.adoc+++ b/solr/solr-ref-guide/src/jdbc-r.adoc@@ -38,7 +38,7 @@ Rscript solr_rjdbc.Rlibrary("RJDBC")-solrCP <- c(list.files('/opt/solr/dist/solrj-lib', full.names=TRUE), list.files('/opt/solr/dist', pattern='solrj', full.names=TRUE, recursive = TRUE))+solrCP <- c(list.files('/opt/solr/server/lib/ext/', list.files('/opt/solr/server/solr-webapp/webapp/WEB-INF/lib/', full.names=TRUE, recursive = TRUE))drv <- JDBC("org.apache.solr.client.solrj.io.sql.DriverImpl",solrCP,diff --git a/solr/solr-ref-guide/src/jdbc-squirrel.adoc b/solr/solr-ref-guide/src/jdbc-squirrel.adocindex 48017cf1d81..777a0f39f40 100644--- a/solr/solr-ref-guide/src/jdbc-squirrel.adoc+++ b/solr/solr-ref-guide/src/jdbc-squirrel.adoc@@ -22,8 +22,10 @@ To configure this, you will need to create a new driver for Solr.This will add several SolrJ client .jars to the SQuirreL SQL classpath.The files required are:-* all .jars found in `$SOLR_HOME/dist/solrj-libs`-* the SolrJ .jar found at `$SOLR_HOME/dist/solr-solrj-<version>.jar`+* SolrJ dependency `.jar` s found in `$SOLR_TIP/server/solr-webapp/webapp/WEB-INF/lib/\*` and `$SOLR_TIP/server/lib/ext/*`.+In the Solr distribution these dependencies are not separated from Solr's dependencies, so you must include all or manually choose the exact set that is needed.+Please refer to the https://search.maven.org/artifact/org.apache.solr/solr-solrj/{solr-full-version}/jar[maven release] for the exact dependencies needed for your version.+* The SolrJ `.jar` found at `$SOLR_TIP/server/solr-webapp/webapp/WEB-INF/lib/solr-solrj-<version>.jar`Once the driver has been created, you can create a connection to Solr with the connection string format outlined in the generic section and use the editor to issue queries.diff --git a/solr/solr-ref-guide/src/learning-to-rank.adoc b/solr/solr-ref-guide/src/learning-to-rank.adocindex cd7a74edc25..5f85ee7c92f 100644--- a/solr/solr-ref-guide/src/learning-to-rank.adoc+++ b/solr/solr-ref-guide/src/learning-to-rank.adoc@@ -477,7 +477,7 @@ This example folder is not shipped in the Solr binary release.== Installation of LTR-The ltr contrib module requires the `dist/solr-ltr-*.jar` JARs.+The ltr contrib module requires the `contrib/ltr/lib/solr-ltr-*.jar` JARs.== LTR Configuration@@ -490,7 +490,7 @@ Note that by default paths are relative to the Solr core so they may need adjust+[source,xml]-----<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-ltr-\d.*\.jar" />+<lib dir="${solr.install.dir:../../../..}/contrib/ltr/lib/" regex=".*\.jar" />----* Declaration of the `ltr` query parser.diff --git a/solr/solr-ref-guide/src/libs.adoc b/solr/solr-ref-guide/src/libs.adocindex f4c1e9f0d3e..1dc75682e88 100644--- a/solr/solr-ref-guide/src/libs.adoc+++ b/solr/solr-ref-guide/src/libs.adoc@@ -39,6 +39,8 @@ Create this adjacent to the `conf/` directory; it's not present by default.Certain plugins or add-ons to plugins require placement here.They will document themselves to say so.+* `<solr_install>/server/lib/ext`: The `.jar` files used for the Solr server as well as Solr Core/SolrJ.+Solr incorporates Jetty for providing HTTP server functionality.Jetty has some directories that contain `.jar` files for itself and its own plugins / modules or JVM level plugins (e.g., loggers).Solr plugins won't work in these locations.@@ -64,13 +66,10 @@ These examples show how to load contrib modules into Solr:[source,xml]----<lib dir="${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar" />- <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-extraction-\d.*\.jar" /><lib dir="${solr.install.dir:../../../..}/contrib/clustering/lib/" regex=".*\.jar" />- <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-clustering-\d.*\.jar" /><lib dir="${solr.install.dir:../../../..}/contrib/langid/lib/" regex=".*\.jar" />- <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-langid-\d.*\.jar" />- <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-ltr-\d.*\.jar" />+ <lib dir="${solr.install.dir:../../../..}/contrib/ltr/lib/" regex=".*\.jar" />----diff --git a/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc b/solr/solr-ref-guide/src/major-changes-in-solr-9.adocindex dcf0a89d02b..034cf1f6f56 100644--- a/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc+++ b/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc@@ -61,6 +61,16 @@ In Solr 8, it's possible to add docValues to a schema without re-indexing via `UDue to changes in Lucene 9, that isn't possible any more; the component was removed.If re-indexing is too onerous, use this mechanism in Solr 8.+=== Solr Binary Release `dist/` Directory++The `dist/` directory in the Solr binary release has been removed as of Solr 9.0.++* The `solr-core` and `solr-solrj` jars can be found under `server/solr-webapp/webapp/WEB-INF/lib/`.+* The Solr module jars can be found in `contrib/<module-name>/lib`, packaged individually for each module.+* 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 <<sql-query.adoc#generic-clients,JDBC documentation>>.+== Solr 9.0 Raw Notes_(raw; not yet edited)_@@ -194,6 +204,11 @@ If you rely upon the previous behavior, then you can change the clientPortAddres=== Contrib Module Changes+* SOLR-15916: `dist/` is no longer provided in the binary release.+All module jars are now provided under `contrib/<name>/lib`, including the module jar and all dependency jars.+Please update your `<lib>` entries in your `solrconfig.xml` to use this new location.+More information can be found in the <<libs.adoc#lib-directives-in-solrconfig,Libs documentation>>.+* SOLR-14067: `StatelessScriptUpdateProcessorFactory` moved to `contrib/scripting` package instead of shipping as part of Solr, due to security concerns.Renamed to ScriptUpdateProcessorFactory for simpler name.diff --git a/solr/solr-ref-guide/src/node-roles.adoc b/solr/solr-ref-guide/src/node-roles.adocindex 71d9c6ccb57..17bfcece5b3 100644--- a/solr/solr-ref-guide/src/node-roles.adoc+++ b/solr/solr-ref-guide/src/node-roles.adoc@@ -133,7 +133,7 @@ curl http://localhost:8983/api/cluster/node-roles}-----=== GET /api/cluster/node-roles/role/{role}+=== GET /api/cluster/node-roles/role/\{role}Fetches the current node roles assignment for a specified role.@@ -176,7 +176,7 @@ http://localhost:8983/api/node-roles/role/data/off-=== GET /api/cluster/node-roles/node/{node}+=== GET /api/cluster/node-roles/node/\{node}Fetches the current node roles assignment for the specified node.diff --git a/solr/solr-ref-guide/src/response-writers.adoc b/solr/solr-ref-guide/src/response-writers.adocindex de20edd6dd5..067774a798a 100644--- a/solr/solr-ref-guide/src/response-writers.adoc+++ b/solr/solr-ref-guide/src/response-writers.adoc@@ -412,7 +412,6 @@ You can run these commands from your `$SOLR_INSTALL` directory:[source,bash]----cp contrib/extraction/lib/*.jar server/solr-webapp/webapp/WEB-INF/lib/-cp dist/solr-extraction-*.jar server/solr-webapp/webapp/WEB-INF/lib/----Once the libraries are in place, you can add `wt=xlsx` to your request, and results will be returned as an XLSX sheet.diff --git a/solr/solr-ref-guide/src/result-clustering.adoc b/solr/solr-ref-guide/src/result-clustering.adocindex 4ace9459b98..32b0c74ebc3 100644--- a/solr/solr-ref-guide/src/result-clustering.adoc+++ b/solr/solr-ref-guide/src/result-clustering.adoc@@ -213,14 +213,13 @@ The score of the other topics group is zero.== Installation-The clustering contrib extension requires `dist/solr-clustering-*.jar` and all JARs under `contrib/clustering/lib`.+The clustering contrib extension requires all JARs under `contrib/clustering/lib`.You can include the required contrib JARs in `solrconfig.xml` as shown below (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]----<lib dir="${solr.install.dir:../../..}/contrib/clustering/lib/" regex=".*\.jar" />-<lib dir="${solr.install.dir:../../..}/dist/" regex="solr-clustering-\d.*\.jar" />----== Configurationdiff --git a/solr/solr-ref-guide/src/script-update-processor.adoc b/solr/solr-ref-guide/src/script-update-processor.adocindex 5ca3cdbeb70..911be9eb902 100644--- a/solr/solr-ref-guide/src/script-update-processor.adoc+++ b/solr/solr-ref-guide/src/script-update-processor.adoc@@ -35,7 +35,7 @@ The scripting update processor lives in the contrib module `/contrib/scripting`,Java 11 and previous versions come with a JavaScript engine called Nashorn, but Java 12 will require you to add your own JavaScript engine.Other supported scripting engines like JRuby, Jython, Groovy, all require you to add JAR files.-Learn more about adding the `dist/solr-scripting-*.jar` file, and any other needed JAR files (depending on your scripting engine) into Solr's <<libs.adoc#lib-directories,Lib Directories>>.+Learn more about adding the `contrib/scripting/lib/solr-scripting-*.jar` file, and any other needed JAR files (depending on your scripting engine) into Solr's <<libs.adoc#lib-directories,Lib Directories>>.== Configurationdiff --git a/solr/solr-ref-guide/src/solr-control-script-reference.adoc b/solr/solr-ref-guide/src/solr-control-script-reference.adocindex 732b36eb8ea..d6d7a07add3 100644--- a/solr/solr-ref-guide/src/solr-control-script-reference.adoc+++ b/solr/solr-ref-guide/src/solr-control-script-reference.adoc@@ -90,7 +90,7 @@ For more details, see the section <<SolrCloud Mode>> below.|Optional |Default: `server/`|===+-Define a server directory, defaults to `server` (as in, `$SOLR_HOME/server`).+Define a server directory, defaults to `server` (as in, `$SOLR_TIP/server`).It is uncommon to override this option.When running multiple instances of Solr on the same host, it is more common to use the same server directory for each instance and use a unique Solr home directory using the `-s` option.+@@ -317,23 +317,23 @@ The following examples are provided:* *cloud*: This example starts a 1-4 node SolrCloud cluster on a single machine.When chosen, an interactive session will start to guide you through options to select the initial configset to use, the number of nodes for your example cluster, the ports to use, and name of the collection to be created.+-When using this example, you can choose from any of the available configsets found in `$SOLR_HOME/server/solr/configsets`.+When using this example, you can choose from any of the available configsets found in `$SOLR_TIP/server/solr/configsets`.* *techproducts*: This example starts a single-node Solr instance with a schema designed for the sample documents included in the `$SOLR_HOME/example/exampledocs` directory.+-The configset used can be found in `$SOLR_HOME/server/solr/configsets/sample_techproducts_configs`.+The configset used can be found in `$SOLR_TIP/server/solr/configsets/sample_techproducts_configs`.+The data used can be found in `$SOLR_HOME/example/exampledocs/`.* *schemaless*: This example starts a single-node Solr instance using a managed schema, as described in the section <<schema-factory.adoc#,Schema Factory Definition in SolrConfig>>, and provides a very minimal pre-defined schema.Solr will run in <<schemaless-mode.adoc#,Schemaless Mode>> with this configuration, where Solr will create fields in the schema on the fly and will guess field types used in incoming documents.+-The configset used can be found in `$SOLR_HOME/server/solr/configsets/_default`.+The configset used can be found in `$SOLR_TIP/server/solr/configsets/_default`.* *films*: This example starts a single-node Solr instance using a managed schema, as described in the section <<schema-factory.adoc#,Schema Factory Definition in SolrConfig>>, and then uses the Schema API to create some custom fields.Solr will run in <<schemaless-mode.adoc#,Schemaless Mode>> with this configuration, where Solr will create fields in the schema on the fly and will guess field types used in incoming documents as well. It then loads some sample film data.+-The configset used can be found in `$SOLR_HOME/server/solr/configsets/_default`.+The configset used can be found in `$SOLR_TIP/server/solr/configsets/_default`.+The film data used can be found in `$SOLR_HOME/example/films/films.json`.@@ -655,7 +655,7 @@ The main decision you need to make is whether a configuration directory in ZooKeLet's work through a few examples to illustrate how configuration directories work in SolrCloud.-First, if you don't provide the `-d` or `-n` options, then the default configuration (`$SOLR_HOME/server/solr/configsets/_default/conf`) is uploaded to ZooKeeper using the same name as the collection.+First, if you don't provide the `-d` or `-n` options, then the default configuration (`$SOLR_TIP/server/solr/configsets/_default/conf`) is uploaded to ZooKeeper using the same name as the collection.For example, the following command will result in the `_default` configuration being uploaded to `/configs/contacts` in ZooKeeper: `bin/solr create -c contacts`.@@ -849,10 +849,10 @@ Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.+[%autowidth,frame=none]|===-|Optional |Default: `$SOLR_HOME/server`+|Optional |Default: `$SOLR_TIP/server`|===+-Defines the Solr server directory, by default `$SOLR_HOME/server`.+Defines the Solr server directory, by default `$SOLR_TIP/server`.It is not common to need to override the default, and is only needed if you have customized the `$SOLR_HOME` directory path.`-s`::@@ -1021,7 +1021,7 @@ s|Required |Default: noneThe path of the configuration set to upload.It should have a `conf` directory immediately below it that in turn contains `solrconfig.xml` etc.+-If just a name is supplied, `$SOLR_HOME/server/solr/configsets` will be checked for this name.+If just a name is supplied, `$SOLR_TIP/server/solr/configsets` will be checked for this name.An absolute path may be supplied instead.+*Examples*:@@ -1082,7 +1082,7 @@ s|Required |Default: none|===+The path to write the downloaded configuration set into.-If just a name is supplied, `$SOLR_HOME/server/solr/configsets` will be the parent.+If just a name is supplied, `$SOLR_TIP/server/solr/configsets` will be the parent.An absolute path may be supplied as well.+In either case, _pre-existing configurations at the destination will be overwritten_!diff --git a/solr/solr-ref-guide/src/solrj.adoc b/solr/solr-ref-guide/src/solrj.adocindex b4bd862b958..a36aa366d8d 100644--- a/solr/solr-ref-guide/src/solrj.adoc+++ b/solr/solr-ref-guide/src/solrj.adoc@@ -35,7 +35,7 @@ For projects built with Ant (using http://ant.apache.org/ivy/[Ivy]), place the f[source,xml,subs="verbatim,attributes"]-----<dependency org="org.apache.solr" name="solr-solrj" rev="{solr-docs-version}.0"/>+<dependency org="org.apache.solr" name="solr-solrj" rev="{solr-full-version}"/>----For projects built with Maven, place the following in your `pom.xml`:@@ -45,7 +45,7 @@ For projects built with Maven, place the following in your `pom.xml`:<dependency><groupId>org.apache.solr</groupId><artifactId>solr-solrj</artifactId>- <version>{solr-docs-version}.0</version>+ <version>{solr-full-version}</version></dependency>----@@ -53,28 +53,29 @@ For projects built with Gradle, place the following in your `build.gradle`:[source,groovy,subs="attributes"]-----compile group: 'org.apache.solr', name: 'solr-solrj', version: '{solr-docs-version}.0'+compile group: 'org.apache.solr', name: 'solr-solrj', version: '{solr-full-version}'----=== Adding SolrJ to the Classpath ManuallyIf you are not using one of the above build system, it's still easy to add SolrJ to your build.-At build time, all that is required is the SolrJ jar itself: `solr-solrj-{solr-docs-version}.0.jar`.+At build time, all that is required is the SolrJ jar itself: `solr-solrj-{solr-full-version}.jar`.To compile code manually that uses SolrJ, use a `javac` command similar to:[source,bash,subs="attributes"]-----javac -cp .:$SOLR_HOME/dist/solr-solrj-{solr-docs-version}.0.jar ...+javac -cp .:$SOLR_TIP/server/solr-webapp/webapp/WEB-INF/lib/solr-solrj-{solr-full-version}.jar ...----At runtime, you need a few of SolrJ's dependencies, in addition to SolrJ itself.-For convenience, these dependencies are made available in the `dist/solrj-lib` directory.+In the Solr distribution these dependencies are not separated from Solr's dependencies, so you must include all or manually choose the exact set that is needed.+Please refer to the https://search.maven.org/artifact/org.apache.solr/solr-solrj/{solr-full-version}/jar[maven release] for the exact dependencies needed for your version.Run your project with a classpath like:[source,bash,subs="attributes"]-----java -cp .:$SOLR_HOME/dist/solrj-lib/*:$SOLR_HOME/dist/solr-solrj-{solr-docs-version}.0.jar ...+java -cp .:$SOLR_TIP/server/lib/ext:$SOLR_TIP/server/solr-webapp/webapp/WEB-INF/lib/* ...----If you are worried about the SolrJ libraries expanding the size of your client application, you can use a code obfuscator like http://proguard.sourceforge.net/[ProGuard] to remove APIs that you are not using.diff --git a/solr/solr-ref-guide/src/sql-query.adoc b/solr/solr-ref-guide/src/sql-query.adocindex cde7bcfe121..c7d793a9955 100644--- a/solr/solr-ref-guide/src/sql-query.adoc+++ b/solr/solr-ref-guide/src/sql-query.adoc@@ -551,8 +551,10 @@ This Guide contains documentation to configure the following tools and clients:For most Java-based clients, the following jars will need to be placed on the client classpath:-* all .jars found in `$SOLR_HOME/dist/solrj-libs`-* the SolrJ .jar found at `$SOLR_HOME/dist/solr-solrj-<version>.jar`+* SolrJ dependency `.jar` s found in `$SOLR_TIP/server/solr-webapp/webapp/WEB-INF/lib/\*` and `$SOLR_TIP/server/lib/ext/*`.+In the Solr distribution these dependencies are not separated from Solr's dependencies, so you must include all or manually choose the exact set that is needed.+Please refer to the https://search.maven.org/artifact/org.apache.solr/solr-solrj/{solr-full-version}/jar[maven release] for the exact dependencies needed for your version.+* The SolrJ `.jar` found at `$SOLR_TIP/server/solr-webapp/webapp/WEB-INF/lib/solr-solrj-<version>.jar`If you are using Maven, the `org.apache.solr.solr-solrj` artifact contains the required jars.diff --git a/solr/solr-ref-guide/src/tutorial-films.adoc b/solr/solr-ref-guide/src/tutorial-films.adocindex 690a74ae92b..617c33460e9 100644--- a/solr/solr-ref-guide/src/tutorial-films.adoc+++ b/solr/solr-ref-guide/src/tutorial-films.adoc@@ -244,7 +244,7 @@ Each command will produce output similar to the below seen while indexing JSON:[source,bash,subs="verbatim,attributes"]----$ ./bin/post -c films example/films/films.json-/bin/java -classpath /solr-{solr-docs-version}.0/dist/solr-core-{solr-docs-version}.0.jar -Dauto=yes -Dc=films -Ddata=files org.apache.solr.util.SimplePostTool example/films/films.json+/bin/java -classpath /solr-{solr-docs-version}.0/server/solr-webapp/webapp/WEB-INF/lib/solr-core-{solr-docs-version}.0.jar -Dauto=yes -Dc=films -Ddata=files org.apache.solr.util.SimplePostTool example/films/films.jsonSimplePostTool version 5.0.0Posting files to [base] url http://localhost:8983/solr/films/update...Entering auto mode. File endings considered are xml,json,jsonl,csv,pdf,doc,docx,ppt,pptx,xls,xlsx,odt,odp,ods,ott,otp,ots,rtf,htm,html,txt,log