diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-01-11 18:35:50 +0100 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-01-11 18:35:50 +0100 |
commit | 216315958b8af26150562eee634bf4774904c0a6 (patch) | |
tree | ee4799e8f4a84a5c874aa4cd9d30e2c2536ea65d /source/pyAggr3g470r.py | |
parent | We'll try a simple index searching algorithm. (diff) | |
download | newspipe-216315958b8af26150562eee634bf4774904c0a6.tar.gz newspipe-216315958b8af26150562eee634bf4774904c0a6.tar.bz2 newspipe-216315958b8af26150562eee634bf4774904c0a6.zip |
Search function now using MongoDB indexed fulltext searching.
Diffstat (limited to 'source/pyAggr3g470r.py')
-rwxr-xr-x | source/pyAggr3g470r.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py index 479d8562..6bc45bfd 100755 --- a/source/pyAggr3g470r.py +++ b/source/pyAggr3g470r.py @@ -162,14 +162,12 @@ class pyAggr3g470r(object): in the description of the article. """ param, _, value = query.partition(':') - wordre = re.compile(r'\b%s\b' % param, re.I) feed_id = None if param == "Feed": feed_id, _, query = value.partition(':') - feeds = self.mongo.get_all_feeds() + search_result = self.mongo.full_search(param) tmpl = lookup.get_template("search.html") - return tmpl.render(feeds=feeds, feed_id=feed_id, query=query, \ - wordre=wordre, mongo=self.mongo) + return tmpl.render(search_result=search_result, query=query, feed_id=feed_id, mongo=self.mongo) search.exposed = True |