From 5bf0f1f1dac1a943b4f621def1190bb9385df495 Mon Sep 17 00:00:00 2001 From: cedricbonhomme Date: Mon, 22 Oct 2012 00:12:32 +0200 Subject: No longer create index on MongoDB articles collection. --- source/mongodb.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'source/mongodb.py') diff --git a/source/mongodb.py b/source/mongodb.py index 8d07bf38..64bd9218 100644 --- a/source/mongodb.py +++ b/source/mongodb.py @@ -54,13 +54,7 @@ class Articles(object): Add article(s) in a collection. """ collection = self.db[str(feed_id)] - - try: - collection.create_index([("article_date", pymongo.DESCENDING)], \ - {"unique":False, "sparse":False}) - except: - print "Oups" - + #collection.create_index([("article_date", pymongo.DESCENDING)], {"unique":False, "sparse":False}) for article in articles: cursor = collection.find({"article_id":article["article_id"]}) if cursor.count() == 0: -- cgit