diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-07-04 07:34:30 +0200 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-07-04 07:34:30 +0200 |
commit | f7ea6f2a4161773941526f77c19c3c691b3b9858 (patch) | |
tree | 3d3c55799dccc44715cf31016e0f1fb802391bb3 /source | |
parent | Updated version number in the documentation. (diff) | |
download | newspipe-f7ea6f2a4161773941526f77c19c3c691b3b9858.tar.gz newspipe-f7ea6f2a4161773941526f77c19c3c691b3b9858.tar.bz2 newspipe-f7ea6f2a4161773941526f77c19c3c691b3b9858.zip |
Removed MongoDB full-search function.
Diffstat (limited to 'source')
-rw-r--r-- | source/mongodb.py | 12 |
1 files changed, 0 insertions, 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): """ |