Kouhei Sutou
null+****@clear*****
Mon Feb 17 13:58:08 JST 2014
Kouhei Sutou 2014-02-17 13:58:08 +0900 (Mon, 17 Feb 2014) New Revision: ad2b97b13c50907f46e82a58d4aa5c85b40a202c https://github.com/droonga/fluent-plugin-droonga/commit/ad2b97b13c50907f46e82a58d4aa5c85b40a202c Message: planner: remove "message.type =" shortcut We don't know whether it is needed for many cases or not for now. So we remove it for now. If we know that it is needed for many cases, we will add it again. Modified files: lib/droonga/plugin/metadata/planner_message.rb lib/droonga/plugins/crud.rb lib/droonga/plugins/search.rb Modified: lib/droonga/plugin/metadata/planner_message.rb (+1 -14) =================================================================== --- lib/droonga/plugin/metadata/planner_message.rb 2014-02-17 13:13:16 +0900 (63fc1e9) +++ lib/droonga/plugin/metadata/planner_message.rb 2014-02-17 13:58:08 +0900 (4b4cd21) @@ -22,30 +22,17 @@ module Droonga end def pattern - configuration[:pattern] || fallback_pattern + configuration[:pattern] end def pattern=(pattern) configuration[:pattern] = pattern end - def type - configuration[:type] - end - - def type=(type) - configuration[:type] = type - end - private def configuration @plugin_class.options[:message] ||= {} end - - def fallback_pattern - return nil if type.nil? - ["type", :equal, type] - end end end end Modified: lib/droonga/plugins/crud.rb (+1 -1) =================================================================== --- lib/droonga/plugins/crud.rb 2014-02-17 13:13:16 +0900 (2684e27) +++ lib/droonga/plugins/crud.rb 2014-02-17 13:58:08 +0900 (7ad6703) @@ -36,7 +36,7 @@ module Droonga end class Planner < Droonga::Planner - message.type = "add" + message.pattern = ["type", :equal, "add"] def plan(message) scatter(message, Modified: lib/droonga/plugins/search.rb (+1 -1) =================================================================== --- lib/droonga/plugins/search.rb 2014-02-17 13:13:16 +0900 (6d82c0c) +++ lib/droonga/plugins/search.rb 2014-02-17 13:58:08 +0900 (e49d1ee) @@ -23,7 +23,7 @@ module Droonga Plugin.registry.register("search", self) class Planner < Droonga::Planner - message.type = "search" + message.pattern = ["type", :equal, "search"] def plan(message) planner = DistributedSearchPlanner.new(message) -------------- next part -------------- HTML����������������������������...Download