[Groonga-commit] droonga/fluent-plugin-droonga at 6e4f718 [master] Don't output needless information

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Jan 31 15:40:38 JST 2014


YUKI Hiroshi	2014-01-31 15:40:38 +0900 (Fri, 31 Jan 2014)

  New Revision: 6e4f718729ad0b862cb56cb112805affee961a3f
  https://github.com/droonga/fluent-plugin-droonga/commit/6e4f718729ad0b862cb56cb112805affee961a3f

  Message:
    Don't output needless information

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

  Modified: lib/droonga/plugin/distributor/distributed_search_planner.rb (+9 -8)
===================================================================
--- lib/droonga/plugin/distributor/distributed_search_planner.rb    2014-01-31 15:33:51 +0900 (e56e13a)
+++ lib/droonga/plugin/distributor/distributed_search_planner.rb    2014-01-31 15:40:38 +0900 (478f061)
@@ -256,14 +256,15 @@ module Droonga
 
         @reducers["records"] = build_records_reducer
 
-        mapper = {
-          "type" => "sort",
-          "offset" => @records_offset,
-          "limit" => @records_limit,
-          "format" => @records_format,
-          "attributes" => final_attributes,
-        }
-        mapper["no_output"] = true unless @output_records
+        mapper = {}
+        if @output_records
+          mapper["format"]     = @records_format unless @records_format == "simple"
+          mapper["attributes"] = final_attributes unless final_attributes.empty?
+          mapper["offset"]     = @records_offset unless @records_offset.zero?
+          mapper["limit"]      = @records_limit unless @records_limit.zero?
+        else
+          mapper["no_output"] = true
+        end
         @mappers["records"] = mapper
       end
 
-------------- next part --------------
HTML����������������������������...
下载 



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