Skip to main content

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

To verify the status of the Solr service

sudo systemctl status solr

To restart the Solr service

sudo systemctl restart solr

Start Solr

sudo systemctl start solr

Stop Solr

sudo systemctl stop solr

Enable Solr (Start on Boot)

sudo systemctl enable solr

Disable Solr (Do Not Start on Boot)

sudo systemctl disable solr

Check Solr Version

solr version

Check Solr Health

curl http://localhost:8983/solr/admin/info/system

View Solr Logs

# Adjust the path based on your Solr installation

tail -f /path/to/solr/server/logs/solr.log

Reload Solr Cores (After Configuration Changes)

curl http://localhost:8983/solr/admin/cores?action=RELOAD&core=your_core_name

Remember to replace your_core_name with the actual name of your Solr core. Additionally, adjust the paths and URLs based on your specific Solr setup.

Always be cautious when making changes to your Solr configuration or restarting services, especially in a production environment. Check logs and test your Solr instance after making significant changes.

 

 

Related articles

Andrew Fletcher17 Feb 2024
Drupal - Solr working through tm_X3b_en_body error
Having updated Solr, re-indexing wasn't working. The error in the logs wasDrupal\search_api_solr\SearchApiSolrException while indexing item entity:node/2386:en: Solr endpoint http://127.0.0.1:8983/ bad request (code: 400, body: Exception writing document id...
Andrew Fletcher16 Feb 2024
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 DocumentsYou can use the Solr Admin interface or send a DELETE request to remove all documents from a Solr core.Solr Admin Interface:Open your web browser and navigate...