Yoji Shidara
null+****@clear*****
Thu Dec 5 19:22:44 JST 2013
Yoji Shidara 2013-12-05 19:22:44 +0900 (Thu, 05 Dec 2013) New Revision: 2a6dbf015eb56337ad1ff130ba37490217ee7ecf https://github.com/droonga/fluent-plugin-droonga/commit/2a6dbf015eb56337ad1ff130ba37490217ee7ecf Message: Extract output_limit method Modified files: lib/droonga/plugin/distributor/distributed_search_plan.rb Modified: lib/droonga/plugin/distributor/distributed_search_plan.rb (+4 -2) =================================================================== --- lib/droonga/plugin/distributor/distributed_search_plan.rb 2013-12-05 19:21:01 +0900 (54323a5) +++ lib/droonga/plugin/distributor/distributed_search_plan.rb 2013-12-05 19:22:44 +0900 (b6bcbdb) @@ -153,8 +153,6 @@ module Droonga # | UNLIMITED | B | => | final_offset + B | final_offset + B | B | # | A | UNLIMITED | => | final_offset + A | final_offset + A | A | # | A | B | => | final_offset + min(A, B) | final_offset + min(A, B)| min(A, B) | - output_limit = @output["limit"] || 0 - final_limit = 0 if sort_limit == UNLIMITED && output_limit == UNLIMITED final_limit = UNLIMITED @@ -203,6 +201,10 @@ module Droonga end end + def output_limit + @output["limit"] || 0 + end + def calculate_output_offset! @output["offset"] = 0 if has_records? end -------------- next part -------------- HTML����������������������������...Download