Navigation Menu

Skip to content

Commit

Permalink
Update sample codes for Droonga 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Feb 20, 2014
1 parent 32fba15 commit 444f08c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tutorial/plugin-development/adapter/index.md
Expand Up @@ -190,7 +190,7 @@ lib/droonga/plugins/sample-logger.rb:
Plugin.registry.register("sample-logger", self)

class Adapter < Droonga::Adapter
message.input_pattern = ["type", :equal, "search"]
input_message.pattern = ["type", :equal, "search"]

def adapt_input(input_message)
$log.info("SampleLoggerPlugin::Adapter", :message => input_message)
Expand All @@ -200,6 +200,8 @@ lib/droonga/plugins/sample-logger.rb:
(snip)
~~~

(Note: `input_message.pattern` is for Droonga 1.0.0 and later. On Droonga 0.9.9, you have to use a deprecated configuration `message.input_pattern` instead.)

Restart fluentd:

~~~
Expand Down Expand Up @@ -321,6 +323,7 @@ lib/droonga/plugins/sample-logger.rb:
(snip)
module SampleLoggerPlugin
Plugin.registry.register("sample-logger", self)
(snip)

class Adapter < Droonga::Adapter
def adapt_output(output_message)
Expand Down Expand Up @@ -463,7 +466,7 @@ module Droonga
Plugin.registry.register("store-search", self)

class Adapter < Droonga::Adapter
message.input_pattern = ["type", :equal, "storeSearch"]
input_message.pattern = ["type", :equal, "storeSearch"]

def adapt_input(input_message)
$log.info("StoreSearchPlugin::Adapter", :message => input_message)
Expand Down Expand Up @@ -505,6 +508,8 @@ module Droonga
end
~~~

(Note: `input_message.pattern` is for Droonga 1.0.0 and later. On Droonga 0.9.9, you have to use a deprecated configuration `message.input_pattern` instead.)

Then update catalog.json to activate the plugin. Remove the `sample-logger` plugin previously created.

catalog.json:
Expand Down

0 comments on commit 444f08c

Please sign in to comment.