mirror of
https://github.com/simon987/od-database.git
synced 2025-12-16 08:09:04 +00:00
Should fix memory usage problem when crawling
This commit is contained in:
@@ -107,7 +107,8 @@ class ElasticSearchEngine(SearchEngine):
|
||||
if len(docs) >= import_every:
|
||||
self._index(docs)
|
||||
docs.clear()
|
||||
self._index(docs)
|
||||
if docs:
|
||||
self._index(docs)
|
||||
|
||||
def _index(self, docs):
|
||||
print("Indexing " + str(len(docs)) + " docs")
|
||||
|
||||
Reference in New Issue
Block a user