From 6f800a80e29b3d91f5ea8a355f098c2a02b7013a Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Mon, 24 Jun 2013 21:09:25 +0200 Subject: Added index_base view in order to launch the indexing. --- source/pyAggr3g470r.py | 12 +++++++++++- source/search.py | 6 +++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py index d0753537..f065b871 100755 --- a/source/pyAggr3g470r.py +++ b/source/pyAggr3g470r.py @@ -58,6 +58,7 @@ import conf import utils import export import mongodb +import search import feedgetter import auth @@ -607,7 +608,6 @@ class pyAggr3g470r(object): logout.exposed = True - @auth.require() def drop_base(self): """ @@ -618,6 +618,16 @@ class pyAggr3g470r(object): drop_base.exposed = True + @auth.require() + def index_base(self): + """ + Launches the indexing of the database. + """ + search.create_index() + return self.index() + + index_base.exposed = True + @auth.require() def export(self, export_method): """ diff --git a/source/search.py b/source/search.py index fd412a7e..218d2436 100644 --- a/source/search.py +++ b/source/search.py @@ -75,7 +75,7 @@ def search(term): if __name__ == "__main__": # Point of entry in execution mode. - create_index() - """results = search("Nothomb") + #create_index() + results = search("Nothomb") for article in results: - print(article)""" \ No newline at end of file + print(article) \ No newline at end of file -- cgit