@@ -0,0 +1,1073 @@
+#!/usr/bin/env python%0A%0Aimport urllib2%0Aimport xml.etree.ElementTree as ET%0A%0ATEN_MINUTES_IN_SECONDS = 60 * 10%0A%0AXML_CONTENT_TYPE = 'application/xml'%0A%0Adef create_xml_delete_command(query):%0A    update = ET.Element('update')%0A    delete = ET.SubElement(update, 'delete')%0A    query_element = ET.SubElement(delete, 'query')%0A    query_element.text = query%0A    commit = ET.SubElement(update, 'commit', %7B'expungeDeletes': 'true'%7D)%0A    return ET.tostring(update)%0A%0Adef delete_by_query_xml(url, query):%0A    content_type_header = %7B'Content-Type': XML_CONTENT_TYPE%7D%0A    delete_command = create_xml_delete_command(query)%0A    request = urllib2.Request(url, delete_command, content_type_header)%0A    try:%0A        response = urllib2.urlopen(request, None, TEN_MINUTES_IN_SECONDS)%0A    except urllib2.HTTPError as e:%0A        print e.read()%0A        raise%0A    else:%0A        try:%0A            response_string = response.read()%0A            print response_string%0A        finally:%0A            response.close()%0A%0Aif __name__ == %22__main__%22:%0A    from sys import argv%0A    delete_by_query_xml(argv%5B1%5D, argv%5B2%5D)%0A

add solr deleter