Andrew Fletcher published: 16 February 2024 (updated) 17 February 2024 1 minute read
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 Fletcher
•
04 Jun 2024
No results showing for your Solr instance - solr.service: Failed with result 'exit-code'
When Solr is displaying results on the site, first step is to log in the server and check its status● solr.service - LSB: Controls Apache Solr as a Service
Loaded: loaded (/etc/init.d/solr; generated)
Active: failed (Result: exit-code) since Wed 2024-04-17 23:22:52 UTC; 6h ago
...
Andrew Fletcher
•
17 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 Fletcher
•
16 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...