Skip to main content

Solr commands

On an Ubuntu 20.02 system with Nginx, you can utilize the following commands to handle Solr:

Solr clearing out the data

Cleaning out or clearing data in Solr can be done in a few different ways, depending on your specific requirements.

 

Delete All Documents

You can use the Solr Admin interface or send a DELETE request to remove all documents from a Solr core.

How To Install Apache Solr 8.11 on Ubuntu

In this article I'll walk through the steps I went through to install Solr on Ubuntu.

 

Step 1: Java

Check if Java is installed on your server:

java -version

Not there - then Java is the first step for you to set up for Solr.  JAVA SE 8 or Later is required to run Apache Solr 8.  Utilisation taking after order to check in the event that you have Java introduced as of now on your system.

Ubuntu Jetty Solr running

The following the CKAN source install docs from start to finish including solr.  At this point, the site should load but you'll get solr errors.  Make the following solr updates:

Go the the directory

/etc/systemd/system

Check if there is a directory jetty9.service.d.  In my situation there was, but if it doesn't exist

Adding Solr authentication to your server

Adding basic security to your server, requires altering the security.json file.  For me this file was located

/var/solr/data/

 

Add a User or Edit a Password

The set-user command allows you to add users and change their passwords. For example, the following defines two users and their passwords:

Subscribe to Solr