aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/views.py
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2014-04-23 14:09:10 +0200
committerCédric Bonhomme <kimble.mandel@gmail.com>2014-04-23 14:09:10 +0200
commitf75bd130184f4a6d5a75279d6c5c0f8af9942da6 (patch)
tree990043a0d5b12b7904cba14546f64d032b5b9fc8 /pyaggr3g470r/views.py
parentAutoindexation of new articles (not on Heroku). (diff)
downloadnewspipe-f75bd130184f4a6d5a75279d6c5c0f8af9942da6.tar.gz
newspipe-f75bd130184f4a6d5a75279d6c5c0f8af9942da6.tar.bz2
newspipe-f75bd130184f4a6d5a75279d6c5c0f8af9942da6.zip
Separate indexes by users.
Diffstat (limited to 'pyaggr3g470r/views.py')
-rw-r--r--pyaggr3g470r/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index 8ec3978f..f3f4636f 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -410,7 +410,7 @@ def index_database():
"""
if not conf.ON_HEROKU:
user = User.query.filter(User.id == g.user.id).first()
- fastsearch.create_index(user.feeds)
+ fastsearch.create_index(user)
flash('Database indexed.', 'success')
return redirect(url_for('home'))
else:
@@ -459,7 +459,7 @@ def search():
result = []
query = request.args.get('query', None)
if query != None:
- results, nb_articles = fastsearch.search(query)
+ results, nb_articles = fastsearch.search(user.id, query)
for feed_id in results:
for feed in user.feeds:
if feed.id == feed_id:
bgstack15