Tuesday, November 22, 2016

Deleting a single document from the Solr index

You may need to delete a single document from the Solr index at some time. This is a several step process if you use the Solr Admin UI.

1. Navigate to the Solar Admin UI in your web browser, select your core, and go to the Documents page.

2. Change the "Document Type" dropdown to "Solr Command" and enter the following text in the "Document(s)" field (change the "doc_1" text to the actual id of your document):

<delete><query>id:doc_1</query></delete>



3. Press the submit button to delete the document.

4. Enter the following text in the "Document(s)" field:

<commit/>



5. Press the submit button again to tell the Solr index to update the index (otherwise the changes will not show up in the Blacklight search interface)

6. Search for the document in the Blacklight search interface to see if the document has been successfully deleted.