Masafumi Yokoyama
null+****@clear*****
Wed Jan 6 18:15:48 JST 2016
Masafumi Yokoyama 2016-01-06 18:15:48 +0900 (Wed, 06 Jan 2016) New Revision: 813d7fde15a33aaad0bac8132968fc281f0aa66d https://github.com/ranguba/rroonga/commit/813d7fde15a33aaad0bac8132968fc281f0aa66d Message: Fix example Modified files: ext/groonga/rb-grn-database.c Modified: ext/groonga/rb-grn-database.c (+22 -1) =================================================================== --- ext/groonga/rb-grn-database.c 2016-01-06 18:15:06 +0900 (08605f0) +++ ext/groonga/rb-grn-database.c 2016-01-06 18:15:48 +0900 (b87a0fb) @@ -632,8 +632,29 @@ rb_grn_database_unmap (VALUE self) * this method spends more time rather than you specify only reindex * needed index columns. * - * @example + * @example How to recreate all index columns in the database + * database = Groonga::Database.create(:path => "/tmp/db") + * + * Groonga::Schema.define do |schema| + * schema.create_table("Memos") do |table| + * table.short_text("title") + * table.text("content") + * end + * + * schema.create_table("Terms", + * :type => :patricia_trie, + * :key_type => :short_text, + * :normalizer => "NormalizerAuto", + * :default_tokenizer => "TokenBigram") do |table| + * table.index("Memos.title") + * table.index("Memos.content") + * end + * end + * * database.reindex + * # => + * # Groonga["Terms.Memos_title"].reindex + * # Groonga["Terms.Memos_content"].reindex * * @overload reindex * @return [void] -------------- next part -------------- HTML����������������������������...Download