aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rwxr-xr-xsource/pyAggr3g470r.py12
-rw-r--r--source/search.py6
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
bgstack15