diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-06-24 21:09:25 +0200 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-06-24 21:09:25 +0200 |
commit | 6f800a80e29b3d91f5ea8a355f098c2a02b7013a (patch) | |
tree | b9e9f80909bb05bf9eea27942d7fb9ff77d1a777 | |
parent | Updated the /management template. (diff) | |
download | newspipe-6f800a80e29b3d91f5ea8a355f098c2a02b7013a.tar.gz newspipe-6f800a80e29b3d91f5ea8a355f098c2a02b7013a.tar.bz2 newspipe-6f800a80e29b3d91f5ea8a355f098c2a02b7013a.zip |
Added index_base view in order to launch the indexing.
-rwxr-xr-x | source/pyAggr3g470r.py | 12 | ||||
-rw-r--r-- | 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): """ @@ -619,6 +619,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): """ Export articles currently loaded from the MongoDB database with 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 |