Solr: Delete/Remove a specific solr document from solr index
Note : If you are not aware of Solr please click here
Problem statement :
While working with one of the live project of leading law firm, I encountered an issue with Solr search result. The website is build on Sitecore CMS and for search functionality using Solr index to store/retrieve the press release, article, biography, events etc information.
On item publish from the Sitecore CMS the solr index got updated. On every publishing Solr document created, updated or removed. But sometime an weird issue observed and the expected solr document does not removed from the solr core. Somehow I need to remove the solr document from the core either programmatically or using the solr interface. In this blog I am going to show how we can delete a specific solr document using solr admin panel.
Solution:
Step 1 : Go to Solr Admin panel in my case the solr admin accessible from http://192.168.2.12:85/solr/#/
Step 2 : Now select the specific core from the drop down as shown below
Step 3 : Then click on "Document" link shown below
Step 4: Prepare the query to delete the specific document from solr index as shown below
Solr XML query document type structure is as follows
<delete><query>_group:d82f1224f0604fb48aa61c012c5b5e1f</query></delete>
you may create and execute the Solr query using different document types
In the above steps I used XML.
If you like this article please comment and share with others.
Happy coding😃
Problem statement :
While working with one of the live project of leading law firm, I encountered an issue with Solr search result. The website is build on Sitecore CMS and for search functionality using Solr index to store/retrieve the press release, article, biography, events etc information.
On item publish from the Sitecore CMS the solr index got updated. On every publishing Solr document created, updated or removed. But sometime an weird issue observed and the expected solr document does not removed from the solr core. Somehow I need to remove the solr document from the core either programmatically or using the solr interface. In this blog I am going to show how we can delete a specific solr document using solr admin panel.
Solution:
Step 1 : Go to Solr Admin panel in my case the solr admin accessible from http://192.168.2.12:85/solr/#/
Step 2 : Now select the specific core from the drop down as shown below
Step 3 : Then click on "Document" link shown below
Step 4: Prepare the query to delete the specific document from solr index as shown below
Solr XML query document type structure is as follows
<delete><query>_group:d82f1224f0604fb48aa61c012c5b5e1f</query></delete>
you may create and execute the Solr query using different document types
- CSV
- Document builder
- File upload
- JSON
- Solr command
- XML
In the above steps I used XML.
If you like this article please comment and share with others.
Happy coding😃
Comments
Post a Comment