Well, it is easy to shut down Solr correctly. First of all, you should shut down the Solr at the same terminal it was started. You can use the shortcut key CTRL + C to shut it down properly without any loss of data.