This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import solr | |
# create a connection to a solr server | |
s = solr.SolrConnection('http://foo/bar/:8180/solr') | |
# get all documents, | |
response = s.query('*:*') | |
# start to loop for delete all data | |
while response: | |
for hit in response.results: |