YUKI Hiroshi
null+****@clear*****
Mon Dec 9 13:49:09 JST 2013
YUKI Hiroshi 2013-12-09 13:49:09 +0900 (Mon, 09 Dec 2013) New Revision: 7233da5d589b4c1d421b2ddb08e584cd8f7d3398 https://github.com/droonga/fluent-plugin-droonga/commit/7233da5d589b4c1d421b2ddb08e584cd8f7d3398 Message: Apply maximum valeu as the sortBy-limit, if both sortBy-limit and output-limit are given 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-09 12:17:48 +0900 (9af0870) +++ lib/droonga/plugin/distributor/distributed_search_plan.rb 2013-12-09 13:49:09 +0900 (9a770c4) @@ -154,7 +154,7 @@ module Droonga # | UNLIMITED | UNLIMITED | => | UNLIMITED | UNLIMITED | UNLIMITED | # | 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) | + # | A | B | => | final_offset + max(A, B) | final_offset + min(A, B)| min(A, B) | # XXX final_limit and final_offset calculated in many times @@ -164,7 +164,9 @@ module Droonga if final_limit == UNLIMITED @output["limit"] = UNLIMITED else - @query["sortBy"]["limit"] = final_offset + final_limit if rich_sort? + if rich_sort? + @query["sortBy"]["limit"] = final_offset + [sort_limit, output_limit].max + end @output["limit"] = final_offset + final_limit end end -------------- next part -------------- HTML����������������������������...다운로드