{"id":21198702,"url":"https://github.com/natlibfi/finna-solr","last_synced_at":"2025-10-18T23:57:16.694Z","repository":{"id":144742175,"uuid":"81196302","full_name":"NatLibFi/finna-solr","owner":"NatLibFi","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-04T12:30:59.000Z","size":3346,"stargazers_count":2,"open_issues_count":0,"forks_count":7,"subscribers_count":5,"default_branch":"dev","last_synced_at":"2025-01-21T14:46:12.050Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"XSLT","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NatLibFi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-07T10:30:42.000Z","updated_at":"2024-12-04T12:31:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"6ee7d475-3530-41a5-9026-dc850768d421","html_url":"https://github.com/NatLibFi/finna-solr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2Ffinna-solr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2Ffinna-solr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2Ffinna-solr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2Ffinna-solr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NatLibFi","download_url":"https://codeload.github.com/NatLibFi/finna-solr/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243652707,"owners_count":20325611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T19:53:03.238Z","updated_at":"2025-10-18T23:57:11.643Z","avatar_url":"https://github.com/NatLibFi.png","language":"XSLT","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Finna Solr\n\nSolr for Finna (VuFind)\n\nThis is the Finna VuFind configuration for Solr. Important bits:\n\n- Solr distribution is installed into vendor directory\n- Solr home (set in solr.in.finna.sh[.sample]) is ./vufind which contains the Finna VuFind core configs\n- The JTS libraries (from https://sourceforge.net/projects/jts-topo-suite/) are added to vendor/server/solr-webapp/webapp/WEB-INF/lib (putting them in vufind/lib doesn't seem to work, probably because of SOLR-4852 and SOLR-6188, and trying workaround still doesn't let JTS load properly):\n  - jts\n  - jtsio\n- The following libraries are copied to vufind/lib (having them in solrconfig.xml doesn't play nice with dynamic collection management in SolrCloud):\n  - vendor/contrib/analysis-extras/lib/icu4j-*.jar\n  - vendor/contrib/analysis-extras/lucene-libs/lucene-analyzers-icu-*.jar\n- Raudikko (a pure Java implementation of Voikko) is included for Finnish language processing\n\n## Installation\n\n1. Put the files somewhere\n2. Add user solr\n3. Run ./install_solr.sh\n4. chown the files and directories to solr user\n5. Copy vufind/solr.in.finna.sh.sample to vufind/solr.in.finna.sh and edit as required\n6. Use the following commands to start or stop Solr manually:\n\n        SOLR_INCLUDE=vufind/solr.in.finna.sh vendor/bin/solr start\n\n        SOLR_INCLUDE=vufind/solr.in.finna.sh vendor/bin/solr stop\n\n7. To enable startup via system init and management with service command in init-based systems like RHEL 6.x, copy vufind/solr.finna-init-script to file /etc/init.d/solr, make it executable, change the paths in it and execute the following commands:\n\n        chkconfig --add solr\n        chkconfig solr on\n\n8. With systemd-based systemd, like CentOS 7, copy vufind/solr.service to /etc/systemd/system/, change paths in it and execute the following commands:\n\n        systemctl daemon-reload\n        systemctl enable solr\n\n9. In init-based systems, start and stop Solr with commands:\n\n        service solr start\n\n        service solr stop\n\n10. In systemd-based systems, start and stop Solr with commands:\n\n        systemctl start solr\n\n        systemctl stop solr\n\n11. Check the logs at vufind/logs for any errors\n\n12. If running in SolrCloud mode, use a chroot (with external Zookeeper ensemble, not required in development with embedded Zookeeper) and make sure to create the root directory in zkCli:\n\n        zookeeper-x.y.z/bin/zkCli.sh -server 127.0.0.1:2181\n        create /solr []\n\n13. Use the following command to add a collection configuration to Zookeeper so that Solr can find it:\n\n    In production when using an external Zookeeper, its address is specified in solr.in.finna.sh, so there is no need to specify it for the command:\n\n        SOLR_INCLUDE=vufind/solr.in.finna.sh vendor/bin/solr zk upconfig -n biblio1 -d vufind/biblio/conf\n\n    If you're running SolrCloud with the embedded Zookeeper (for development purposes), you'll need to specify Zookeeper address with the -z parameter (Zookeeper port is Solr's port + 1000):\n\n        SOLR_INCLUDE=vufind/solr.in.finna.sh vendor/bin/solr zk upconfig -z localhost:9983 -n biblio1 -d vufind/biblio/conf\n\n14. Now you can create a new collection that uses the configuration by calling the collections API:\n\n        curl 'http://localhost:8983/solr/admin/collections?action=CREATE\u0026name=biblio1\u0026numShards=1\u0026replicationFactor=3\u0026collection.configName=biblio1'\n\n    If you need to create a collection on just a single node of a SolrCloud, you can use the placement rules to\n    define the location, e.g.\n\n        curl 'http://localhost:8983/solr/admin/collections?action=CREATE\u0026name=biblio1\u0026numShards=1\u0026replicationFactor=1\u0026collection.configName=biblio1\u0026rule=shard:*,host:domain.somewhere'\n\n    If you want to have more than one shard per node, use the maxShardsPerNode parameter:\n\n        curl 'http://localhost:8983/solr/admin/collections?action=CREATE\u0026name=biblio1\u0026numShards=3\u0026replicationFactor=3\u0026collection.configName=biblio1\u0026maxShardsPerNode=3'\n\n    Add a replica to a collection:\n\n        curl 'http://localhost:8983/solr/admin/collections?action=ADDREPLICA\u0026collection=biblio1\u0026shard=shard1\u0026node=domain.somewhere:8983_solr\u0026type=nrt'\n\n    Remove a replica from a collection:\n\n        curl 'http://localhost:8983/solr/admin/collections?action=DELETEREPLICA\u0026collection=biblio1\u0026shard=shard1\u0026replica=core_nodeX'\n\n    Use an alias to point to the current index version in use. This way you can just point the alias to a new index version when it's ready to use:\n\n        curl 'http://localhost:8983/solr/admin/collections?action=CREATEALIAS\u0026name=biblioprod\u0026collections=biblio1'\n\n    If you need to reload a collection e.g. for new configuration to take effect, you can do it using the collections API:\n\n        curl 'http://localhost:8983/solr/admin/collections?action=RELOAD\u0026name=biblio1'\n\n    When a collection is no longer needed, remove it using the collections API:\n\n        curl 'http://localhost:8983/solr/admin/collections?action=DELETE\u0026name=biblio1'\n\n    To check the SolrCloud status:\n\n        scripts/cluster_status.php\n\n    or\n\n        curl 'http://localhost:8983/solr/admin/collections?action=clusterstatus\u0026wt=json' | json_reformat\n\n    Full docs for the collections API:https://solr.apache.org/guide/8_11/collections-api.html\n\n15. To run a second Solr instance:\n\n        scripts/create_instance_dir vufind8984\n\n        SOLR_HOME=`pwd`/vufind8984 SOLR_PORT=8984 SOLR_INCLUDE=vufind/solr.in.finna.sh vendor/bin/solr start\n\n## Update\n\n1. Pull the changes\n2. Run ./installsolr.sh\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatlibfi%2Ffinna-solr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatlibfi%2Ffinna-solr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatlibfi%2Ffinna-solr/lists"}