mirror of
https://github.com/simon987/od-database.git
synced 2025-04-19 18:36:44 +00:00
Replace delete_by_query with bulk delete (cleanup)
This commit is contained in:
parent
2f6ae3cb35
commit
64ce9379c3
@ -112,12 +112,6 @@ class ElasticSearchEngine(SearchEngine):
|
|||||||
def ping(self):
|
def ping(self):
|
||||||
return self.es.ping()
|
return self.es.ping()
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def batch(iterable, n=1):
|
|
||||||
l = len(iterable)
|
|
||||||
for ndx in range(0, l, n):
|
|
||||||
yield iterable[ndx:min(ndx + n, l)]
|
|
||||||
|
|
||||||
def delete_docs(self, website_id):
|
def delete_docs(self, website_id):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user