You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ep...@apache.org on 2022/04/01 20:58:38 UTC

[solr] branch branch_9x updated: documentation fixes

This is an automated email from the ASF dual-hosted git repository.

epugh pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new 8ab8c26  documentation fixes
8ab8c26 is described below

commit 8ab8c26c29b2f17cdcaccd43ca237977c146fe97
Author: epugh@opensourceconnections.com <>
AuthorDate: Fri Apr 1 16:58:06 2022 -0400

    documentation fixes
---
 solr/modules/sql/README.md                              |  8 ++++----
 .../pages/script-update-processor.adoc                  | 17 ++++++++++++-----
 .../modules/configuration-guide/pages/solr-modules.adoc | 11 +++++++++--
 3 files changed, 25 insertions(+), 11 deletions(-)

diff --git a/solr/modules/sql/README.md b/solr/modules/sql/README.md
index eeb72dd..364a8d0 100644
--- a/solr/modules/sql/README.md
+++ b/solr/modules/sql/README.md
@@ -3,11 +3,11 @@ Apache Solr SQL Module
 
 Introduction
 ------------
-This module implements the support for SQL in Apache Solr. 
+This module implements the support for SQL in Apache Solr.
 
 Building
 --------
-The SQL module uses the same Gradle build as the core Solr components. 
+The SQL module uses the same Gradle build as the core Solr components.
 
 To build the module, you can use
 
@@ -16,7 +16,7 @@ To build the module, you can use
 ```
 
 The resulting module will be placed to the libs directory, for example:
-`solr/modules/hdfs/build/libs/solr-sql-9.0.0-SNAPSHOT.jar`
+`solr/modules/sql/build/libs/solr-sql-9.0.0-SNAPSHOT.jar`
 
 To execute the module tests:
 
@@ -26,4 +26,4 @@ To execute the module tests:
 
 Usage
 -----
-Please refer to the 'SQL Query Language' section of the reference guide: https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html
+Please refer to the 'SQL Query Language' section of the reference guide: https://solr.apache.org/guide/query-guide/sql-query.html
diff --git a/solr/solr-ref-guide/modules/configuration-guide/pages/script-update-processor.adoc b/solr/solr-ref-guide/modules/configuration-guide/pages/script-update-processor.adoc
index 0f944b7..c38e364 100644
--- a/solr/solr-ref-guide/modules/configuration-guide/pages/script-update-processor.adoc
+++ b/solr/solr-ref-guide/modules/configuration-guide/pages/script-update-processor.adoc
@@ -30,12 +30,13 @@ However, you are introducing some potential security vulnerabilities.
 
 == Installing the ScriptingUpdateProcessor and Scripting Engines
 
-The scripting update processor lives in the module `/modules/scripting`, and you need to explicitly add it to your Solr setup.
+This is provided via a xref:configuration-guide:solr-modules.adoc[Solr Module] that needs to be added to the classpath before use
+by adding it to the list of modules via `solr.modules=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.
+Other supported scripting engines like JRuby, Jython, Groovy, all require you to add JAR files to Solr.
 
-Learn more about adding the `modules/scripting/lib/solr-scripting-*.jar` file, and any other needed JAR files (depending on your scripting engine) into Solr's xref:libs.adoc#lib-directories[Lib Directories].
+Learn more about adding any other needed JAR files (depending on your scripting engine) into Solr's xref:libs.adoc#lib-directories[Lib Directories].
 
 == Configuration
 
@@ -110,13 +111,19 @@ This is useful for logging information from the script.
 `params`::
 The "params" object, if any specified, from the configuration.
 
+== Try it Out
+
+To try out scripting, enable the `<updateRequestProcessorChain name="script">` configuration in the
+file `./server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml`. Then start Solr via
+`bin/solr start -e techproducts -Dsolr.modules=scripting`.
+
+This URL demonstrates specifying the "script" update chain: `http://localhost:8983/solr/techproducts/update?commit=true&stream.contentType=text/csv&fieldnames=id,description&stream.body=1,foo&update.chain=script` which logs the following:
+
 == Examples
 
 The `processAdd()` and the other script methods can return false to skip further processing of the document.
 All methods must be defined, though generally the `processAdd()` method is where the action is.
 
-Here's a URL that works with the techproducts example setup demonstrating specifying the "script" update chain: `http://localhost:8983/solr/techproducts/update?commit=true&stream.contentType=text/csv&fieldnames=id,description&stream.body=1,foo&update.chain=script` which logs the following:
-
 [source,text]
 ----
 INFO: update-script#processAdd: id=1
diff --git a/solr/solr-ref-guide/modules/configuration-guide/pages/solr-modules.adoc b/solr/solr-ref-guide/modules/configuration-guide/pages/solr-modules.adoc
index 503bbe2..29229ae 100644
--- a/solr/solr-ref-guide/modules/configuration-guide/pages/solr-modules.adoc
+++ b/solr/solr-ref-guide/modules/configuration-guide/pages/solr-modules.adoc
@@ -28,14 +28,21 @@ each module are also packaged with the module. This helps keep the main core of
 == Installing a module
 
 The easiest way to enable a module is to list the modules you intend to use either in the
-system property `solr.modules` or in the environment variable `SOLR_MODULES` (e.g. in`solr.in.sh`
+system property `solr.modules` or in the environment variable `SOLR_MODULES` (e.g. in `solr.in.sh`
 or `solr.in.cmd`). You can also add a `<str name="modules">` tag to
 xref:configuration-guide:configuring-solr-xml.adoc[solr.xml]. The expected value is a comma separated list
 of module names, e.g. `SOLR_MODULES=extracting,ltr`. This way of adding modules will add
 them to the shared class loader, making them available for every collection in Solr.
 
+You can also specify the modules when using the Solr CLI to start Solr:
+
+[source,bash]
+----
+bin/solr start -e techproducts -Dsolr.modules=scripting
+----
+
 If you only wish to enable a module for a single collection, you may add `<lib>` tags to `solrconfig.xml`
 as explained in xref:configuration-guide:libs.adoc[Lib Directories].
 
 Some modules may have been made available as packages for the xref:configuration-guide:package-manager.adoc[Package Manager],
-check by listing available pacakges.
\ No newline at end of file
+check by listing available packages.