http://localhost:8080/solr/update?stream.body=<delete><query>id:XXXXX</query></delete>&commit=true
This lets you delete documents where the id field matches XXXXX.
If you want to delete items that matches more than one field, just add another query:
http://localhost:8983/solr/update?stream.body=<delete><query>id:XXXXX</query><query>entitytype:YourContent</query></delete>&commit=true
If you want to delete all items in the index, just use this query:
<delete><query>*:*</query></delete>
Source: http://blog.dileno.com/archive/201106/delete-documents-from-solr-index-by-query/
No comments:
Post a Comment