From f7ea6f2a4161773941526f77c19c3c691b3b9858 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Thu, 4 Jul 2013 07:34:30 +0200 Subject: Removed MongoDB full-search function. --- source/mongodb.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/source/mongodb.py b/source/mongodb.py index c32d1428..241e8dd0 100644 --- a/source/mongodb.py +++ b/source/mongodb.py @@ -229,18 +229,6 @@ class Articles(object): collection = self.db[str(feed_id)] collection.update({"type": 0, "feed_id":feed_id}, {"$set": changes}, multi=True) - def full_search(self, term): - """ - Indexed full text search through content of articles. - """ - articles = {} - for collection in self.get_all_feeds(): - # TODO: test the full text search. Not all words are found with the search function - result = self.db[collection["feed_id"]].find({'article_content': {'$regex': term, "$options": 'i' }}) - if result.count() != 0: - articles[collection["feed_id"]] = result.sort([("article_date", pymongo.DESCENDING)]) - return articles - # Functions on database def drop_database(self): """ -- cgit