diff --git a/solr/Dockerfile b/solr/Dockerfile index 5307aac0..2909a56d 100644 --- a/solr/Dockerfile +++ b/solr/Dockerfile @@ -2,10 +2,10 @@ FROM java ARG TARGETARCH -ARG SOLR_VERSION="8.11.2" -ARG SOLR_FILE="solr-${SOLR_VERSION}.tgz" -ARG SOLR_URL="https://archive.apache.org/dist/lucene/solr/${SOLR_VERSION}/${SOLR_FILE}" -ARG SOLR_FILE_SHA256="54d6ebd392942f0798a60d50a910e26794b2c344ee97c2d9b50e678a7066d3a6" +ARG SOLR_VERSION=9.4.0 +ARG SOLR_FILE=solr-${SOLR_VERSION}.tgz +ARG SOLR_URL=https://archive.apache.org/dist/solr/solr/${SOLR_VERSION}/solr-${SOLR_VERSION}.tgz +ARG SOLR_FILE_SHA256=5ff28fe3a9d92804d53c0072a8459bb1d0c280e212a288a9efd31f923fe1a9d4 EXPOSE 8983 @@ -30,7 +30,7 @@ RUN create-service-user.sh --name solr /data && \ # Defaults environment variables to be overloaded. ENV \ SOLR_JAVA_OPTS= \ - SOLR_JETTY_OPTS= \ + SOLR_JETTY_OPTS=-Dsolr.jetty.host=0.0.0.0 \ SOLR_LOG_LEVEL=INFO \ SOLR_MEMORY=512m diff --git a/solr/README.md b/solr/README.md index f5eac4d5..10f2bb88 100644 --- a/solr/README.md +++ b/solr/README.md @@ -1,10 +1,10 @@ # Solr -Docker image for [Solr] version 8.11.2. +Docker image for [solr] version 9.4.0. Please refer to the [Solr Documentation] for more in-depth information. -As a quick example this will bring up an instance of [Solr], and allow you +As a quick example this will bring up an instance of [solr], and allow you to view on . ```bash @@ -19,12 +19,12 @@ additional settings, volumes, ports, etc. ## Settings -| Environment Variable | Default | Description | -| :------------------- | :------ | :----------------------------------------------------------------------------- | -| SOLR_JAVA_OPTS | | Additional parameters to pass to the JVM when starting Solr | -| SOLR_JETTY_OPTS | | Additional parameters to pass to Jetty when starting Solr. | -| SOLR_LOG_LEVEL | INFO | Log level. Possible Values: OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE or ALL | -| SOLR_MEMORY | 512m | Sets the min (-Xms) and max (-Xmx) heap size for the JVM | +| Environment Variable | Default | Description | +| :------------------- | :-------------------------- | :----------------------------------------------------------------------------- | +| SOLR_JAVA_OPTS | | Additional parameters to pass to the JVM when starting Solr | +| SOLR_JETTY_OPTS | `-Dsolr.jetty.host=0.0.0.0` | Additional parameters to pass to Jetty when starting Solr. | +| SOLR_LOG_LEVEL | `INFO` | Log level. Possible Values: OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE or ALL | +| SOLR_MEMORY | `512m` | Sets the min (-Xms) and max (-Xmx) heap size for the JVM | ## Ports @@ -42,29 +42,25 @@ additional settings, volumes, ports, etc. - [Solr Logging] -[Solr Documentation]: https://lucene.apache.org/solr/guide/7_1/ -[Solr Logging]: https://lucene.apache.org/solr/guide/7_1/configuring-logging.html -[Solr]: https://lucene.apache.org/solr/ - -## Changing versions +## Updating -There is 2 values you need to update/change the version. - -1. Solr version: found at [archive.apache.org](https://archive.apache.org/dist/lucene/solr) -1. SOLR_FILE_SHA256: sha256sum of the tgz file - -```dockerfile -ARG SOLR_VERSION="8.11.2" -ARG SOLR_FILE_SHA256="54d6ebd392942f0798a60d50a910e26794b2c344ee97c2d9b50e678a7066d3a6" -``` +You can change the version used for [solr] by modifying the build argument +`SOLR_VERSION` and `SOLR_FILE_SHA256` in the `Dockerfile`. -Go to [archive.apache.org](https://archive.apache.org/dist/lucene/solr) and find the version you want. There will be several files but the one to use have the following naming convention. - -* solr-${SOLR_VERSION}.tgz - -Download the two files and run and replace the _1.1.1_ with the version you have. +Change `SOLR_VERSION` and then generate the `SOLR_FILE_SHA256` with the following +commands: ```bash -# This outputs the value to use for $SOLR_FILE_SHA256. -sha256sum solr-1.1.1.tgz +SOLR_VERSION=$(cat solr/Dockerfile | grep -o 'SOLR_VERSION=.*' | cut -f2 -d=) +SOLR_FILE=$(cat solr/Dockerfile | grep -o 'SOLR_FILE=.*' | cut -f2 -d=) +SOLR_URL=$(cat solr/Dockerfile | grep -o 'SOLR_URL=.*' | cut -f2 -d=) +SOLR_FILE=$(eval "echo $SOLR_FILE") +SOLR_URL=$(eval "echo $SOLR_URL") +wget --quiet "${SOLR_URL}" +shasum -a 256 "${SOLR_FILE}" | cut -f1 -d' ' +rm "${SOLR_FILE}" ``` + +[Solr Documentation]: https://lucene.apache.org/solr/guide/7_1/ +[Solr Logging]: https://lucene.apache.org/solr/guide/7_1/configuring-logging.html +[solr]: https://lucene.apache.org/solr/ diff --git a/test/rootfs/opt/solr/server/solr/default/conf/schema.xml b/test/rootfs/opt/solr/server/solr/default/conf/schema.xml index 7c463e03..64edea98 100644 --- a/test/rootfs/opt/solr/server/solr/default/conf/schema.xml +++ b/test/rootfs/opt/solr/server/solr/default/conf/schema.xml @@ -30,7 +30,7 @@ It should be kept correct and concise, usable out-of-the-box. For more information, on how to customize this file, please see - http://wiki.apache.org/solr/SchemaXml + https://solr.apache.org/guide/solr/latest/indexing-guide/schema-elements.html PERFORMANCE NOTE: this schema includes many optional features and should not be used for benchmarking. To improve performance one could @@ -49,7 +49,7 @@ that avoids logging every request --> - + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - - - - - + + + + + + - - + + - - + + - - + + - - + + - - + + @@ -264,9 +264,11 @@ single-valued and either required or have a default value. --> + + + @@ -369,7 +372,7 @@ --> - + diff --git a/test/rootfs/opt/solr/server/solr/default/conf/schema_extra_types.xml b/test/rootfs/opt/solr/server/solr/default/conf/schema_extra_types.xml index 91d11778..88c29fdd 100644 --- a/test/rootfs/opt/solr/server/solr/default/conf/schema_extra_types.xml +++ b/test/rootfs/opt/solr/server/solr/default/conf/schema_extra_types.xml @@ -2,7 +2,7 @@ Edge NGram String Field 6.0.0 --> - + @@ -19,12 +19,13 @@ Edge NGram Text Field 7.0.0 --> - + - + + @@ -32,7 +33,7 @@ - + @@ -42,12 +43,13 @@ English Text Field 7.0.0 --> - + - + + @@ -55,7 +57,7 @@ - + @@ -74,19 +76,20 @@ English Text Field unstemmed 7.0.0 --> - + - + + - + @@ -99,18 +102,19 @@ Fulltext Phonetic 7.0.0 --> - + - + + - + @@ -123,18 +127,19 @@ Fulltext Phonetic English 7.0.0 --> - + - + + - + @@ -147,7 +152,7 @@ Fulltext String Field 6.0.0 --> - + @@ -161,19 +166,20 @@ Language Undefined Text Field 7.0.0 --> - + - + + - + @@ -186,10 +192,10 @@ Language Undefined Text Field spellcheck 7.0.0 --> - + - + @@ -199,12 +205,12 @@ Language Undefined Text Field collated 7.0.0 --> - + - + @@ -221,12 +227,13 @@ NGram Text Field 7.0.0 --> - + - + + @@ -234,7 +241,7 @@ - + diff --git a/test/rootfs/opt/solr/server/solr/default/conf/solrconfig.xml b/test/rootfs/opt/solr/server/solr/default/conf/solrconfig.xml index c34beaeb..54f2768e 100644 --- a/test/rootfs/opt/solr/server/solr/default/conf/solrconfig.xml +++ b/test/rootfs/opt/solr/server/solr/default/conf/solrconfig.xml @@ -9,9 +9,9 @@ - + - ${solr.luceneMatchVersion:LUCENE_80} + ${solr.luceneMatchVersion:LUCENE_90} - + - - + - - + - - - + @@ -223,7 +221,7 @@ 'simple' is the default More details on the nuances of each LockFactory... - http://wiki.apache.org/lucene-java/AvailableLockFactories + https://cwiki.apache.org/confluence/display/lucene/AvailableLockFactories --> ${solr.lock.type:native} @@ -284,6 +282,7 @@ solr data directory. --> ${solr.ulog.dir:} + ${solr.ulog.numVersionBuckets:65536} + + + + + + + + - - - 5 - - - + - + - + - + - + true false 20 200 diff --git a/test/rootfs/opt/solr/server/solr/default/conf/solrconfig_requestdispatcher.xml b/test/rootfs/opt/solr/server/solr/default/conf/solrconfig_requestdispatcher.xml index 5f4b9949..3a3f17d1 100644 --- a/test/rootfs/opt/solr/server/solr/default/conf/solrconfig_requestdispatcher.xml +++ b/test/rootfs/opt/solr/server/solr/default/conf/solrconfig_requestdispatcher.xml @@ -3,3 +3,4 @@ 7.0.0 --> + diff --git a/test/rootfs/opt/solr/server/solr/default/conf/solrcore.properties b/test/rootfs/opt/solr/server/solr/default/conf/solrcore.properties index 749fd532..a5c9c373 100644 --- a/test/rootfs/opt/solr/server/solr/default/conf/solrcore.properties +++ b/test/rootfs/opt/solr/server/solr/default/conf/solrcore.properties @@ -10,4 +10,4 @@ solr.autoCommit.MaxTime=15000 solr.autoSoftCommit.MaxDocs=-1 solr.autoSoftCommit.MaxTime=5000 -solr.luceneMatchVersion=8.11 +solr.luceneMatchVersion=9.8.0