[Groonga-commit] droonga/fluent-plugin-droonga at 68cf51b [master] Skip reducing phase if the query doesn't output count and records

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Dec 5 13:14:08 JST 2013


YUKI Hiroshi	2013-12-05 13:14:08 +0900 (Thu, 05 Dec 2013)

  New Revision: 68cf51baf12bb32ca1d6c5a9d5755b129756de29
  https://github.com/droonga/fluent-plugin-droonga/commit/68cf51baf12bb32ca1d6c5a9d5755b129756de29

  Message:
    Skip reducing phase if the query doesn't output count and records

  Modified files:
    lib/droonga/plugin/distributor/distributed_search_plan.rb

  Modified: lib/droonga/plugin/distributor/distributed_search_plan.rb (+6 -1)
===================================================================
--- lib/droonga/plugin/distributor/distributed_search_plan.rb    2013-12-05 12:59:34 +0900 (876f4d1)
+++ lib/droonga/plugin/distributor/distributed_search_plan.rb    2013-12-05 13:14:08 +0900 (b31dcde)
@@ -78,8 +78,13 @@ module Droonga
 
     def transform_query(input_name, query)
       output = query["output"]
+
       # Skip reducing phase for a result with no output.
-      return unless output
+      if output.nil? or
+           output["elements"].nil? or
+           (output["elements"] - ["count", "recors"]).empty?
+        return
+      end
 
       @input_names << input_name
       output_name = input_name + "_reduced"
-------------- next part --------------
HTML����������������������������...
下载 



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