From 2235ceda4dbb4a697071c4bcea7f6a3815471a6e Mon Sep 17 00:00:00 2001 From: Ben Pennell Date: Tue, 21 Jan 2025 16:41:23 -0500 Subject: [PATCH 01/14] Update config for solr 9 in dev --- docker-compose.yml | 22 +- solr/config/schema.xml | 10 +- solr/config/solrconfig.xml | 1223 +++++++++++++++++++++++++++++------- 3 files changed, 1012 insertions(+), 243 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index c8bbf1142..dc6b7e4e8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,7 @@ services: - clamav - db - fedora - - solr8 + - solr env_file: - docker/.env ports: @@ -35,7 +35,7 @@ services: - db - fedora - redis - - solr8 + - solr - web command: sh /hyrax/docker/start-sidekiq.sh env_file: @@ -92,26 +92,30 @@ services: - "6379:6379" networks: - hycdev - solr8: - image: solr:8.11-slim + solr: + image: solr:9 + user: "8983:8983" volumes: - ./solr/config:/opt/solr/server/solr/configsets/hy-c - - solr8-data:/var/solr/data + - solr-data:/var/solr/data ports: - "8983:8983" command: > bash -c " - precreate-core hydra-development /opt/solr/server/solr/configsets/hy-c && - precreate-core hydra-test /opt/solr/server/solr/configsets/hy-c && - exec solr -f + mkdir -p /var/solr/data && + chown -R 8983:8983 /var/solr && + gosu solr precreate-core hydra-development /opt/solr/server/solr/configsets/hy-c && + gosu solr precreate-core hydra-test /opt/solr/server/solr/configsets/hy-c && + gosu solr solr -f " + user: root networks: - hycdev volumes: mount-code: mount-gems: mount-sidekiq-gems: - solr8-data: + solr-data: clam: pg_data: fcrepo_data: diff --git a/solr/config/schema.xml b/solr/config/schema.xml index ba1fff6a0..cabbe4048 100755 --- a/solr/config/schema.xml +++ b/solr/config/schema.xml @@ -45,7 +45,7 @@ that avoids logging every request --> - + + @@ -126,7 +126,7 @@ - + @@ -135,7 +135,7 @@ - + @@ -144,7 +144,7 @@ - + diff --git a/solr/config/solrconfig.xml b/solr/config/solrconfig.xml index 6732bcaf1..70dc13fab 100755 --- a/solr/config/solrconfig.xml +++ b/solr/config/solrconfig.xml @@ -17,10 +17,17 @@ --> + - 8.11.1 + 9.8 + + + + + + + + + + + + + - - - - + + ${solr.data.dir:} + + + - + class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/> + - + + + + + - ${solr.blacklight-core.data.dir:} + + - - - + + + + + + + + + + + + + + + ${solr.lock.type:native} + + - - *:* - + The latest commit point should always be preserved regardless + of the criteria. + --> + + + + + + + + + + + + + + + + + + ${solr.ulog.dir:} + ${solr.ulog.numVersionBuckets:65536} + ${solr.autoCommit.maxTime:15000} false + + - ${solr.autoSoftCommit.maxTime:-1} + ${solr.autoSoftCommit.maxTime:3000} + + + - - - + + + + + - - edismax - explicit - *:* - OR - 2<-1 5<-2 6<90% - 1 - 2 - 0.01 - + + - - id - title_tesim - author_tesim - subject_tesim - - - all_text_timv^10 - - - - author_tesim - - - - - title_tesim - - - - - subject_tesim - - - - - - *, - score - - - true - 1 - - true - default - true - true - false - 5 + - - - spellcheck - - + - - id, - access_ssim, - discover_access_group_ssim,discover_access_person_ssim, - read_access_group_ssim,read_access_person_ssim, - edit_access_group_ssim,edit_access_person_ssim, - depositor_ti, - embargo_release_date_dtsi - inheritable_access_ssim, - inheritable_discover_access_group_ssim,inheritable_discover_access_person_ssim, - inheritable_read_access_group_ssim,inheritable_read_access_person_ssim, - inheritable_edit_access_group_ssim,inheritable_edit_access_person_ssim, - inheritable_embargo_release_date_dtsi - - - + Caches results of searches - ordered lists of document ids + (DocList) based on a query, a sort, and the range of documents requested. + Additional supported parameter by CaffeineCache: + maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed + to occupy + --> + + + + + + + + + + + + + + + + + true + + + + + + 20 + + + 200 + + + + + + + + + + -suppressed_bsi:true + + + + + + + -suppressed_bsi:true + + + + + + false + + + + + + + + + + + + + + + + + + + explicit - lucene + 10 - - + + - all - * - 1 - {!term f=id v=$id} + explicit + json + true - - - + + - true + _text_ - - termsComponent - - + - + https://solr.apache.org/guide/solr/latest/query-guide/spell-checking.html + --> + - textSpell + - + + + + + + + + + + + + + + + + + + + + + + + + - - + - + IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS + NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM! - - - + See https://solr.apache.org/guide/solr/latest/query-guide/spell-checking.html for details + on the request parameters. + --> + + + + + + + + + + + + + + + + + + - - + + + + + + + + 100 + + + + + + + + 70 + + 0.5 + + [-\w ,/\n\"']{20,200} + + + + + + + ]]> + ]]> + + + + + + + + + + + + + + + + + + + + + + + + ,, + ,, + ,, + ,, + ,]]> + ]]> + + + + + + 10 + .,!? + + + + + + + WORD + + + en + US + + + - - - true - 5 - mySuggester - - - suggest - - - --> + - - - - + Chains or individual Update Request Processor Factories can be declared and referenced + to preprocess documents sent to Update Request Handlers. + --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + From dfe9f97c4958d2c31f769e69c1c25f64be956ff3 Mon Sep 17 00:00:00 2001 From: Ben Pennell Date: Thu, 23 Jan 2025 12:52:06 -0500 Subject: [PATCH 02/14] Update solr config again, fix some path issues --- docker-compose.yml | 3 +- docker/.env | 4 +- solr/config/schema.xml | 2 +- solr/config/solrconfig.xml | 952 ++++++++++--------------------------- 4 files changed, 260 insertions(+), 701 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index dc6b7e4e8..12442f598 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -96,7 +96,7 @@ services: image: solr:9 user: "8983:8983" volumes: - - ./solr/config:/opt/solr/server/solr/configsets/hy-c + - ./solr/config:/opt/solr/server/solr/configsets/hy-c/conf - solr-data:/var/solr/data ports: - "8983:8983" @@ -104,6 +104,7 @@ services: bash -c " mkdir -p /var/solr/data && chown -R 8983:8983 /var/solr && + chown -R 8983:8983 /var/solr/data && gosu solr precreate-core hydra-development /opt/solr/server/solr/configsets/hy-c && gosu solr precreate-core hydra-test /opt/solr/server/solr/configsets/hy-c && gosu solr solr -f diff --git a/docker/.env b/docker/.env index 26263cf8b..1b408de94 100644 --- a/docker/.env +++ b/docker/.env @@ -7,7 +7,7 @@ HYRAX_DATABASE_PASSWORD=password HYRAX_HOST=https://localhost:3000 REDIS_HOST=redis REDIS_URL=redis://redis:6379/0 -SOLR_DEV_URL=http://solr8:8983/solr/hydra-development -SOLR_TEST_URL=http://solr8:8983/solr/hydra-test +SOLR_DEV_URL=http://solr:8983/solr/hydra-development +SOLR_TEST_URL=http://solr:8983/solr/hydra-test RIIIF_CACHE_PATH=/opt/hyrax/riiif_cache RAILS_CACHE_PATH=/opt/rails-cache \ No newline at end of file diff --git a/solr/config/schema.xml b/solr/config/schema.xml index cabbe4048..71f171917 100755 --- a/solr/config/schema.xml +++ b/solr/config/schema.xml @@ -84,7 +84,7 @@ - + - 9.8 - + + - - - - - - - - - - + ${solr.blacklight-core.data.dir:} - - ${solr.data.dir:} + + + + *:* + - - - - - + - - - - - - - - - - - - - - - - - + + id + title_tesim + author_tesim + subject_tesim + + + all_text_timv^10 + + + + author_tesim + + + + + title_tesim + + + + + subject_tesim + + + + + + *, + score + + + true + 1 + + true + default + true + true + false + 5 - - + + + spellcheck + + - + + id, + access_ssim, + discover_access_group_ssim,discover_access_person_ssim, + read_access_group_ssim,read_access_person_ssim, + edit_access_group_ssim,edit_access_person_ssim, + depositor_ti, + embargo_release_date_dtsi + inheritable_access_ssim, + inheritable_discover_access_group_ssim,inheritable_discover_access_person_ssim, + inheritable_read_access_group_ssim,inheritable_read_access_person_ssim, + inheritable_edit_access_group_ssim,inheritable_edit_access_person_ssim, + inheritable_embargo_release_date_dtsi + + + - This option specifies which Lucene LockFactory implementation - to use. + + + explicit + lucene + + - single = SingleInstanceLockFactory - suggested for a - read-only index or when there is no possibility of - another process trying to modify the index. - native = NativeFSLockFactory - uses OS native file locking. - Do not use when multiple solr webapps in the same - JVM are attempting to share a single index. - simple = SimpleFSLockFactory - uses a plain file for locking + + + + all + * + 1 + {!term f=id v=$id} + + - Defaults: 'native' is default for Solr3.6 and later, otherwise - 'simple' is the default + - More details on the nuances of each LockFactory... - https://cwiki.apache.org/confluence/display/lucene/AvailableLockFactories - --> - ${solr.lock.type:native} + + + true + + + termsComponent + + - - - - - - - - - - - + - To aid in advanced debugging, Lucene provides an "InfoStream" - of detailed information when indexing. + textSpell - Setting The value to true will instruct the underlying Lucene - IndexWriter to write its debugging info the specified file + - - - - - - - - - - - ${solr.ulog.dir:} - ${solr.ulog.numVersionBuckets:65536} - - - + + default + spell + ./spell + true + + + author + author_spell + ./spell_author + 0.7 + true + + + subject + subject_spell + ./spell_subject + 0.7 + true + + + title + title_spell + ./spell_title + 0.7 + true + - maxDocs - Maximum number of documents to add since the last - commit before automatically triggering a new commit. + + - maxTime - Maximum amount of time in ms that is allowed to pass - since a document was added before automatically - triggering a new commit. - openSearcher - if false, the commit causes recent index changes - to be flushed to stable storage, but does not cause a new - searcher to be opened to make those changes visible. + - - ${solr.autoCommit.maxTime:15000} - false - - - - - ${solr.autoSoftCommit.maxTime:3000} - - - + + - - - + - + + + + + + + + @@ -561,10 +532,9 @@ will block until the first searcher is done warming. --> false - - - - @@ -691,400 +645,4 @@ _text_ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 100 - - - - - - - - 70 - - 0.5 - - [-\w ,/\n\"']{20,200} - - - - - - - ]]> - ]]> - - - - - - - - - - - - - - - - - - - - - - - - ,, - ,, - ,, - ,, - ,]]> - ]]> - - - - - - 10 - .,!? - - - - - - - WORD - - - en - US - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - From d47413e2ea107fb5140b0d2df8c6179612458a54 Mon Sep 17 00:00:00 2001 From: Ben Pennell Date: Thu, 23 Jan 2025 14:02:57 -0500 Subject: [PATCH 03/14] Simple attempt to update solr in github build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8947d8b33..eba6a9702 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,7 +69,7 @@ jobs: --health-timeout 5s ports: ["5432:5432"] solr: - image: solr:8.11-slim + image: solr:9 ports: - 8983:8983 options: >- From 4bd0b1634200357c9e5edba8dfdf1a020d5b5156 Mon Sep 17 00:00:00 2001 From: Ben Pennell Date: Thu, 23 Jan 2025 15:17:20 -0500 Subject: [PATCH 04/14] Make queries default to *:* like they did in solr 8, since hyrax doesn't specify a q parameter in a lot of places --- solr/config/solrconfig.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/solr/config/solrconfig.xml b/solr/config/solrconfig.xml index deaf051dd..f37d60fc1 100755 --- a/solr/config/solrconfig.xml +++ b/solr/config/solrconfig.xml @@ -627,6 +627,7 @@ explicit 10 + *:* From 8686de4174adc895a08642b1c225889147ff4f38 Mon Sep 17 00:00:00 2001 From: Ben Pennell Date: Fri, 24 Jan 2025 10:30:26 -0500 Subject: [PATCH 05/14] Adjust requestHandlers for solr 8 backwards compatibility since hyrax heavily depends on some defaults that changed --- solr/config/solrconfig.xml | 38 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/solr/config/solrconfig.xml b/solr/config/solrconfig.xml index f37d60fc1..d2a414e40 100755 --- a/solr/config/solrconfig.xml +++ b/solr/config/solrconfig.xml @@ -87,6 +87,7 @@ edismax explicit + *:* *:* OR 2<-1 5<-2 6<90% @@ -140,13 +141,23 @@ true false 5 - spellcheck + + + explicit + + *:* + true + 1 + *,score + + + off @@ -621,29 +632,4 @@ --> - - - - - explicit - 10 - *:* - - - - - - - explicit - json - true - - - - - - - _text_ - - From fffc591ef497a3f40b2b83d6234d8a6c1a864a3f Mon Sep 17 00:00:00 2001 From: Ben Pennell Date: Fri, 24 Jan 2025 10:44:53 -0500 Subject: [PATCH 06/14] Adjust solr setup to run via a step so that precreate command can be called --- .github/workflows/build.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eba6a9702..bfea61c8d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,12 +68,6 @@ jobs: --health-interval 10s --health-timeout 5s ports: ["5432:5432"] - solr: - image: solr:9 - ports: - - 8983:8983 - options: >- - --name solr_container clamavd: image: lokori/clamav-java ports: @@ -124,11 +118,18 @@ jobs: run: | psql -c 'create database hyrax_test with owner hyrax;' - - name: Copy solr config into docker container - run: docker cp solr/config solr_container:/tmp/solr_config + - name: Make directory for solr config + run: mkdir -p /tmp/solr-config - - name: Create Solr core - run: docker exec solr_container solr create -c hydra-test -d /tmp/solr_config + # Need to copy the config is outside of the source path, otherwise it produces permission conflicts + - name: Copy Solr Config into container + run: sudo cp -r ${{ github.workspace }}/solr/config /tmp/solr-config/ + + - name: Run solr container as command to trigger core creation + run: | + docker run -v /tmp/solr-config:/opt/solr/server/solr/configsets/hy-c/ \ + -d --rm -p 8983:8983 solr:9 \ + solr-precreate hydra-test -d /opt/solr/server/solr/configsets/hy-c/ - name: Run rspec tests run: bundle exec rspec From 7d550c959007bc8fb7d4b9b9819dbcf60d266b1e Mon Sep 17 00:00:00 2001 From: Ben Pennell Date: Fri, 24 Jan 2025 11:19:19 -0500 Subject: [PATCH 07/14] Wait for solr to come online --- .github/workflows/build.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bfea61c8d..7c17f8657 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -129,7 +129,22 @@ jobs: run: | docker run -v /tmp/solr-config:/opt/solr/server/solr/configsets/hy-c/ \ -d --rm -p 8983:8983 solr:9 \ - solr-precreate hydra-test -d /opt/solr/server/solr/configsets/hy-c/ + solr-precreate hydra-test /opt/solr/server/solr/configsets/hy-c/ + + - name: Fetch Solr container logs + run: docker logs $(docker ps -q -f ancestor=solr:9) + + - name: Wait for Solr to start + run: | + for i in {1..30}; do + curl -s http://127.0.0.1:8983/solr/admin/cores?action=STATUS | grep -q '"hydra-test"' && break + echo "Waiting for Solr to initialize..." + sleep 2 + done + if ! curl -s http://127.0.0.1:8983/solr/admin/cores?action=STATUS | grep -q '"hydra-test"'; then + echo "Solr did not initialize in time" + exit 1 + fi - name: Run rspec tests run: bundle exec rspec From 6d6cefa0f5ec93e3c7cdcdfd89294081a5a61fb1 Mon Sep 17 00:00:00 2001 From: Ben Pennell Date: Fri, 24 Jan 2025 11:27:42 -0500 Subject: [PATCH 08/14] Try as service again --- .github/workflows/build.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7c17f8657..730e30d9a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,6 +68,12 @@ jobs: --health-interval 10s --health-timeout 5s ports: ["5432:5432"] + solr: + image: solr:9 + ports: + - 8983:8983 + options: >- + --name solr_container clamavd: image: lokori/clamav-java ports: @@ -118,18 +124,12 @@ jobs: run: | psql -c 'create database hyrax_test with owner hyrax;' - - name: Make directory for solr config - run: mkdir -p /tmp/solr-config - # Need to copy the config is outside of the source path, otherwise it produces permission conflicts - name: Copy Solr Config into container - run: sudo cp -r ${{ github.workspace }}/solr/config /tmp/solr-config/ + run: docker cp ./solr/config solr_container:/var/solr/data/hydra-test/ - - name: Run solr container as command to trigger core creation - run: | - docker run -v /tmp/solr-config:/opt/solr/server/solr/configsets/hy-c/ \ - -d --rm -p 8983:8983 solr:9 \ - solr-precreate hydra-test /opt/solr/server/solr/configsets/hy-c/ + - name: Create Solr core + run: docker exec solr_container solr create_core -c hydra-test -d /var/solr/data/hydra-test - name: Fetch Solr container logs run: docker logs $(docker ps -q -f ancestor=solr:9) From 357fa32b1899e85914bcabb813c44c4c8f11e61a Mon Sep 17 00:00:00 2001 From: Ben Pennell Date: Fri, 24 Jan 2025 11:37:00 -0500 Subject: [PATCH 09/14] Try as configset --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 730e30d9a..0d56c6ab9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -126,10 +126,10 @@ jobs: - name: Copy Solr Config into container - run: docker cp ./solr/config solr_container:/var/solr/data/hydra-test/ + run: docker cp ./solr/config solr_container:/opt/solr/server/solr/configsets/hy-c - name: Create Solr core - run: docker exec solr_container solr create_core -c hydra-test -d /var/solr/data/hydra-test + run: docker exec solr_container solr create_core -c hydra-test -d hy-c - name: Fetch Solr container logs run: docker logs $(docker ps -q -f ancestor=solr:9) From aa9aa8412aa142339af8491caefa6e1868ae02f6 Mon Sep 17 00:00:00 2001 From: Ben Pennell Date: Fri, 24 Jan 2025 11:46:29 -0500 Subject: [PATCH 10/14] Adjust path --- .github/workflows/build.yml | 97 ++++++++++++++++++++++--------------- solr/config/schema.xml | 4 +- 2 files changed, 60 insertions(+), 41 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0d56c6ab9..ce8f74e23 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -125,48 +125,67 @@ jobs: psql -c 'create database hyrax_test with owner hyrax;' + - name: Create ConfigSet Directory + run: docker exec solr_container bash -c "mkdir -p /var/solr/configsets/hy-c/conf" + - name: Copy Solr Config into container - run: docker cp ./solr/config solr_container:/opt/solr/server/solr/configsets/hy-c + run: docker cp ./solr/config/. solr_container:/var/solr/configsets/hy-c/conf + + - name: List Solr Config Directory + run: docker exec solr_container bash -c "ls -la /var/solr/configsets/hy-c/conf" + + - name: List libs + run: docker exec solr_container bash -c "ls -la /opt/solr/contrib/analysis-extras/lib" + + - name: Debug Classpath + run: docker exec solr_container bash -c 'echo $(find /opt/solr/ -name "*.jar" | tr "\n" ":")' + continue-on-error: true - name: Create Solr core - run: docker exec solr_container solr create_core -c hydra-test -d hy-c + run: docker exec solr_container solr create_core -c hydra-test -d /var/solr/configsets/hy-c + continue-on-error: true - name: Fetch Solr container logs run: docker logs $(docker ps -q -f ancestor=solr:9) - - - name: Wait for Solr to start - run: | - for i in {1..30}; do - curl -s http://127.0.0.1:8983/solr/admin/cores?action=STATUS | grep -q '"hydra-test"' && break - echo "Waiting for Solr to initialize..." - sleep 2 - done - if ! curl -s http://127.0.0.1:8983/solr/admin/cores?action=STATUS | grep -q '"hydra-test"'; then - echo "Solr did not initialize in time" - exit 1 - fi - - - name: Run rspec tests - run: bundle exec rspec - env: - REDIS_URL: redis://redis - POSTGRES_USER: hyrax - POSTGRES_PASSWORD: password - TMPDIR: /tmp - - - uses: actions/upload-artifact@v4 - with: - name: test-coverage - path: coverage - - - uses: actions/upload-artifact@v4 - with: - name: test-coverage-report - path: coverage/coverage.json - - - name: Report to CodeClimate - uses: paambaati/codeclimate-action@v3.0.0 - with: - debug: false - coverageLocations: | - ${{github.workspace}}/coverage/coverage.json:simplecov + continue-on-error: true + + - name: Dump Solr Logs + run: docker exec solr_container cat /var/solr/logs/solr.log + continue-on-error: true + + # - name: Wait for Solr to start + # run: | + # for i in {1..30}; do + # curl -s http://127.0.0.1:8983/solr/admin/cores?action=STATUS | grep -q '"hydra-test"' && break + # echo "Waiting for Solr to initialize..." + # sleep 2 + # done + # if ! curl -s http://127.0.0.1:8983/solr/admin/cores?action=STATUS | grep -q '"hydra-test"'; then + # echo "Solr did not initialize in time" + # exit 1 + # fi + + # - name: Run rspec tests + # run: bundle exec rspec + # env: + # REDIS_URL: redis://redis + # POSTGRES_USER: hyrax + # POSTGRES_PASSWORD: password + # TMPDIR: /tmp + + # - uses: actions/upload-artifact@v4 + # with: + # name: test-coverage + # path: coverage + + # - uses: actions/upload-artifact@v4 + # with: + # name: test-coverage-report + # path: coverage/coverage.json + + # - name: Report to CodeClimate + # uses: paambaati/codeclimate-action@v3.0.0 + # with: + # debug: false + # coverageLocations: | + # ${{github.workspace}}/coverage/coverage.json:simplecov diff --git a/solr/config/schema.xml b/solr/config/schema.xml index 71f171917..8d2927317 100755 --- a/solr/config/schema.xml +++ b/solr/config/schema.xml @@ -108,7 +108,7 @@ - + @@ -143,7 +143,7 @@ - + From 5124bf286d99a454cb870cc5800dc6c50e888199 Mon Sep 17 00:00:00 2001 From: Ben Pennell Date: Mon, 27 Jan 2025 11:57:38 -0500 Subject: [PATCH 11/14] Add env variable --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ce8f74e23..91f37c9b5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,6 +74,8 @@ jobs: - 8983:8983 options: >- --name solr_container + env: + SOLR_MODULES: analysis-extras,extraction clamavd: image: lokori/clamav-java ports: From 64a093b42cb7a34caa5e352b800027c5629338e6 Mon Sep 17 00:00:00 2001 From: Ben Pennell Date: Mon, 27 Jan 2025 14:25:25 -0500 Subject: [PATCH 12/14] Reenable build --- .github/workflows/build.yml | 82 +++++++++++-------------------------- 1 file changed, 25 insertions(+), 57 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 91f37c9b5..8f07c9b04 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -126,68 +126,36 @@ jobs: run: | psql -c 'create database hyrax_test with owner hyrax;' - - name: Create ConfigSet Directory run: docker exec solr_container bash -c "mkdir -p /var/solr/configsets/hy-c/conf" - name: Copy Solr Config into container run: docker cp ./solr/config/. solr_container:/var/solr/configsets/hy-c/conf - - name: List Solr Config Directory - run: docker exec solr_container bash -c "ls -la /var/solr/configsets/hy-c/conf" - - - name: List libs - run: docker exec solr_container bash -c "ls -la /opt/solr/contrib/analysis-extras/lib" - - - name: Debug Classpath - run: docker exec solr_container bash -c 'echo $(find /opt/solr/ -name "*.jar" | tr "\n" ":")' - continue-on-error: true - - name: Create Solr core run: docker exec solr_container solr create_core -c hydra-test -d /var/solr/configsets/hy-c - continue-on-error: true - - - name: Fetch Solr container logs - run: docker logs $(docker ps -q -f ancestor=solr:9) - continue-on-error: true - - - name: Dump Solr Logs - run: docker exec solr_container cat /var/solr/logs/solr.log - continue-on-error: true - - # - name: Wait for Solr to start - # run: | - # for i in {1..30}; do - # curl -s http://127.0.0.1:8983/solr/admin/cores?action=STATUS | grep -q '"hydra-test"' && break - # echo "Waiting for Solr to initialize..." - # sleep 2 - # done - # if ! curl -s http://127.0.0.1:8983/solr/admin/cores?action=STATUS | grep -q '"hydra-test"'; then - # echo "Solr did not initialize in time" - # exit 1 - # fi - - # - name: Run rspec tests - # run: bundle exec rspec - # env: - # REDIS_URL: redis://redis - # POSTGRES_USER: hyrax - # POSTGRES_PASSWORD: password - # TMPDIR: /tmp - - # - uses: actions/upload-artifact@v4 - # with: - # name: test-coverage - # path: coverage - - # - uses: actions/upload-artifact@v4 - # with: - # name: test-coverage-report - # path: coverage/coverage.json - - # - name: Report to CodeClimate - # uses: paambaati/codeclimate-action@v3.0.0 - # with: - # debug: false - # coverageLocations: | - # ${{github.workspace}}/coverage/coverage.json:simplecov + + - name: Run rspec tests + run: bundle exec rspec + env: + REDIS_URL: redis://redis + POSTGRES_USER: hyrax + POSTGRES_PASSWORD: password + TMPDIR: /tmp + + - uses: actions/upload-artifact@v4 + with: + name: test-coverage + path: coverage + + - uses: actions/upload-artifact@v4 + with: + name: test-coverage-report + path: coverage/coverage.json + + - name: Report to CodeClimate + uses: paambaati/codeclimate-action@v3.0.0 + with: + debug: false + coverageLocations: | + ${{github.workspace}}/coverage/coverage.json:simplecov From dfbc5d3742d6c83dad823ec8c165fb0bcbfa65f4 Mon Sep 17 00:00:00 2001 From: Ben Pennell Date: Wed, 29 Jan 2025 09:46:44 -0500 Subject: [PATCH 13/14] Remove /select requestHandler and enable handleSelect on requestDispatcher --- solr/config/solrconfig.xml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/solr/config/solrconfig.xml b/solr/config/solrconfig.xml index d2a414e40..9ba24d512 100755 --- a/solr/config/solrconfig.xml +++ b/solr/config/solrconfig.xml @@ -30,6 +30,7 @@ --> 9.8 + @@ -147,17 +148,6 @@ - - - explicit - - *:* - true - 1 - *,score - - - off @@ -551,7 +541,7 @@ should behave when processing requests for this SolrCore. --> - + 9.8 - - - -