Update by natay on Thu Jul 18 08:41:44 EDT 2019 from H7-D25RF0PLGQ18
@@ -138,6 +138,7 @@ def crawl(reindex=False, overwrite=False, limit=1000):
"""
Crawl through posts in batches and add them to index.
"""
+ #TODO: run a bulk update
if reindex:
logger.info(f"Setting indexed field to false on all post.")
@@ -153,7 +154,7 @@ def crawl(reindex=False, overwrite=False, limit=1000):
logger.error(f'Error updating index: {exc}')
Post.objects.filter(id__in=posts.values('id')).update(indexed=False)
- # Set the indexed field to true.
+ # Set the indexed field to true
Post.objects.filter(id__in=posts.values('id')).update(indexed=True)
return
