Add -doc-stats options to print document statistics.
[SXSI/xpathcomp.git] / src / options.ml
index 03d24a9..1e349a6 100644 (file)
@@ -1,7 +1,7 @@
 open Utils
 open Format
 
-let index_empty_texts = ref false
+let index_empty_texts = ref true
 let sample_factor = ref 64
 let disable_text_collection = ref false
 let tc_threshold = ref 60000
@@ -18,6 +18,8 @@ let verbose = ref false
 let text_index_type = ref 0
 let do_perf = ref false
 let twopass = ref false
+let repeat = ref 1
+let docstats = ref false
 
 let set_index_type = function
   | "default" -> text_index_type := 0
@@ -66,8 +68,8 @@ let spec = Arg.align
     "-f", Arg.Set_int(sample_factor),
     "<n> sample factor [default=64]";
 
-    "-i", Arg.Set(index_empty_texts),
-    " index empty texts [default=false]";
+    "-ne", Arg.Clear(index_empty_texts),
+    " don't index empty texts [default=index]";
 
     "-d", Arg.Set(disable_text_collection),
     " disable text collection[default=false]";
@@ -82,9 +84,16 @@ let spec = Arg.align
     "-p",  Arg.Set(do_perf), " dump perf counters (Linux only)";
 
     "-index-type", Arg.Symbol ([ "default"; "swcsa"; "rlcsa" ],
-                              set_index_type),
+                               set_index_type),
     " choose text index type";
 
+    "-r", Arg.Set_int(repeat),
+    " repeat query execution n time (benchmarking only, default 1)";
+
+    "-doc-stats", Arg.Set(docstats),
+    " Compute document statistics (performs full traversal)";
+
+
     "-v", Arg.Set(verbose), " verbose mode"; ] @
 IFNDEF NTRACE
 THEN [