[Groonga-commit] droonga/droonga.org at 444f08c [gh-pages] Update sample codes for Droonga 1.0.0

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Feb 20 11:31:45 JST 2014


YUKI Hiroshi	2014-02-20 11:31:45 +0900 (Thu, 20 Feb 2014)

  New Revision: 444f08c3fb6f60d735a744a8be5537f669b77f36
  https://github.com/droonga/droonga.org/commit/444f08c3fb6f60d735a744a8be5537f669b77f36

  Message:
    Update sample codes for Droonga 1.0.0

  Modified files:
    tutorial/plugin-development/adapter/index.md

  Modified: tutorial/plugin-development/adapter/index.md (+7 -2)
===================================================================
--- tutorial/plugin-development/adapter/index.md    2014-02-20 11:20:48 +0900 (41b5545)
+++ tutorial/plugin-development/adapter/index.md    2014-02-20 11:31:45 +0900 (836becf)
@@ -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)
@@ -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:
 
 ~~~
@@ -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)
@@ -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)
@@ -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:
-------------- next part --------------
HTML����������������������������...
Download 



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