Last active
March 18, 2019 16:51
-
-
Save hughdbrown/18d3a97144cca9bcfb7414dde41134bd to your computer and use it in GitHub Desktop.
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
from elasticsearch import Elasticsearch | |
from elasticsearch_dsl import Search, Index | |
client = Elasticsearch() | |
idx = client.indices.stats() | |
for key in idx['indices'].keys(): | |
if key.startswith('unittest'): | |
print(key) | |
Index(key, using=client).delete() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment