6.10 Clearing the Solr search index

Sometimes it may be necessary to empty the entire Solr search index during development. To do this, all records must be deleted from the Goobi viewer without leaving any residue. Finally, the Solr index must be optimized. On the Linux command line, this task can be solved as follows:

cd /opt/digiverso/viewer/indexed_mets/
for i in *.xml; do echo touch ../hotfolder/${i/.xml/.purge}; done
curl "http://localhost:8080/solr/update?optimize=true&waitFlush=false"