[Groonga-commit] groonga/groonga at a8cd5da [master] select: add query log for "drilldown" evaluation

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Feb 21 14:47:06 JST 2017


Kouhei Sutou	2017-02-21 14:47:06 +0900 (Tue, 21 Feb 2017)

  New Revision: a8cd5da005258c4d422cb36bbc953731579596a1
  https://github.com/groonga/groonga/commit/a8cd5da005258c4d422cb36bbc953731579596a1

  Message:
    select: add query log for "drilldown" evaluation

  Modified files:
    lib/proc/proc_select.c

  Modified: lib/proc/proc_select.c (+21 -0)
===================================================================
--- lib/proc/proc_select.c    2017-02-21 14:24:45 +0900 (ad21ff2)
+++ lib/proc/proc_select.c    2017-02-21 14:47:06 +0900 (3f1668e)
@@ -2208,6 +2208,27 @@ grn_select_drilldown_execute(grn_ctx *ctx,
     grn_obj_close(ctx, expression);
   }
 
+  {
+    unsigned int n_hits;
+
+    if (drilldown->filtered_result) {
+      n_hits = grn_table_size(ctx, drilldown->filtered_result);
+    } else {
+      n_hits = grn_table_size(ctx, result->table);
+    }
+    if (data->drilldown.keys.length == 0) {
+      GRN_QUERY_LOG(ctx, GRN_QUERY_LOG_SIZE,
+                    ":", "drilldowns[%.*s](%u)",
+                    (int)(drilldown->label.length),
+                    drilldown->label.value,
+                    n_hits);
+    } else {
+      GRN_QUERY_LOG(ctx, GRN_QUERY_LOG_SIZE,
+                    ":", "drilldown(%u)",
+                    n_hits);
+    }
+  }
+
   return GRN_TRUE;
 }
 
-------------- next part --------------
HTML����������������������������...
Descargar 



More information about the Groonga-commit mailing list
Back to archive index