[Groonga-commit] groonga/fluent-plugin-droonga [master] Extract count output

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Apr 9 18:43:07 JST 2013


Kouhei Sutou	2013-04-09 18:43:07 +0900 (Tue, 09 Apr 2013)

  New Revision: e0152eba70e57812962006cc5f7fc3715616b595
  https://github.com/groonga/fluent-plugin-droonga/commit/e0152eba70e57812962006cc5f7fc3715616b595

  Message:
    Extract count output

  Modified files:
    lib/droonga/plugin/handler_search.rb

  Modified: lib/droonga/plugin/handler_search.rb (+6 -4)
===================================================================
--- lib/droonga/plugin/handler_search.rb    2013-04-09 18:39:10 +0900 (f75bac2)
+++ lib/droonga/plugin/handler_search.rb    2013-04-09 18:43:07 +0900 (ceacf4a)
@@ -102,12 +102,9 @@ module Droonga
 
         params = @query["output"]
         output = {}
+        output_count(params, output)
         offset = params["offset"] || 0
         limit = params["limit"] || 10
-        if params["count"]
-          count =****@resul*****
-          output["count"] = count
-        end
         if params["attributes"].is_a? Array
           attributes = params["attributes"].map do |attribute|
             if attribute.is_a?(String)
@@ -239,6 +236,11 @@ module Droonga
         end
         @result
       end
+
+      def output_count(params, output)
+        return unless params["count"]
+        output["count"] =****@resul*****
+      end
     end
   end
 end
-------------- next part --------------
HTML����������������������������...
Download 



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