diff query.py @ 10:1af09c5ec0a1 draft

Uploaded 20180413
author fabio
date Fri, 13 Apr 2018 07:51:29 -0400
parents 300e4932bad6
children 19ac771cf32a
line wrap: on
line diff
--- a/query.py	Thu Apr 05 06:22:42 2018 -0400
+++ b/query.py	Fri Apr 13 07:51:29 2018 -0400
@@ -35,6 +35,7 @@
     payload["search_mode"] = str(options.search);
     payload["exact_algorithm"] = int(options.exact);
     payload["search_threshold"] = float(options.sthreshold);
+    payload["sort"] = int(options.sortcontrol);
     # set the content type to application/json
     headers = {'Content-type': 'application/json'};
 
@@ -187,6 +188,8 @@
                     action="store", dest="treeid", help="the id of the tree that will be queried");
     parser.add_option("-t", "--sthreshold", type="float",
                     action="store", dest="sthreshold", help="threshold applied to the search algrithm");
+    parser.add_option("-z", "--sort", type="int", default=1,
+                    action="store", dest="sortcontrol", help="boolean required to sort the result");
     parser.add_option("-o", "--outputdir", type="string", default="output",
                     action="store", dest="outputdir", help="output directory (collection) path");
     parser.add_option("-r", "--errorfile", type="string", default="error_txt",