rroonga 1.2.9 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +1 -0
- data/Rakefile +1 -0
- data/bin/grntest-log-analyze +123 -0
- data/bin/groonga-query-log-extract +117 -0
- data/ext/groonga/rb-grn-accessor.c +7 -5
- data/ext/groonga/rb-grn-array-cursor.c +1 -1
- data/ext/groonga/rb-grn-array.c +34 -44
- data/ext/groonga/rb-grn-column.c +74 -38
- data/ext/groonga/rb-grn-context.c +19 -15
- data/ext/groonga/rb-grn-database.c +47 -42
- data/ext/groonga/rb-grn-double-array-trie-cursor.c +40 -0
- data/ext/groonga/rb-grn-double-array-trie.c +530 -0
- data/ext/groonga/rb-grn-encoding-support.c +1 -1
- data/ext/groonga/rb-grn-encoding.c +1 -1
- data/ext/groonga/rb-grn-exception.c +1 -1
- data/ext/groonga/rb-grn-expression-builder.c +1 -1
- data/ext/groonga/rb-grn-expression.c +63 -51
- data/ext/groonga/rb-grn-fix-size-column.c +7 -7
- data/ext/groonga/rb-grn-hash-cursor.c +1 -1
- data/ext/groonga/rb-grn-hash.c +42 -39
- data/ext/groonga/rb-grn-index-column.c +35 -31
- data/ext/groonga/rb-grn-index-cursor.c +1 -1
- data/ext/groonga/rb-grn-logger.c +23 -18
- data/ext/groonga/rb-grn-object.c +40 -27
- data/ext/groonga/rb-grn-operator.c +1 -1
- data/ext/groonga/rb-grn-patricia-trie-cursor.c +1 -1
- data/ext/groonga/rb-grn-patricia-trie.c +122 -90
- data/ext/groonga/rb-grn-plugin.c +8 -7
- data/ext/groonga/rb-grn-posting.c +1 -1
- data/ext/groonga/rb-grn-procedure.c +1 -1
- data/ext/groonga/rb-grn-query.c +12 -12
- data/ext/groonga/rb-grn-record.c +1 -1
- data/ext/groonga/rb-grn-snippet.c +26 -19
- data/ext/groonga/rb-grn-table-cursor-key-support.c +1 -1
- data/ext/groonga/rb-grn-table-cursor.c +4 -3
- data/ext/groonga/rb-grn-table-key-support.c +23 -23
- data/ext/groonga/rb-grn-table.c +268 -153
- data/ext/groonga/rb-grn-type.c +11 -7
- data/ext/groonga/rb-grn-utils.c +4 -1
- data/ext/groonga/rb-grn-variable-size-column.c +1 -1
- data/ext/groonga/rb-grn-variable.c +2 -2
- data/ext/groonga/rb-grn-view-accessor.c +1 -1
- data/ext/groonga/rb-grn-view-cursor.c +1 -1
- data/ext/groonga/rb-grn-view-record.c +1 -1
- data/ext/groonga/rb-grn-view.c +43 -34
- data/ext/groonga/rb-grn.h +6 -2
- data/ext/groonga/rb-groonga.c +1 -1
- data/lib/groonga.rb +4 -2
- data/lib/groonga/context.rb +16 -41
- data/lib/groonga/dumper.rb +6 -4
- data/lib/groonga/expression-builder.rb +52 -26
- data/lib/groonga/grntest-log.rb +206 -0
- data/lib/groonga/pagination.rb +21 -19
- data/lib/groonga/patricia-trie.rb +7 -10
- data/lib/groonga/posting.rb +1 -1
- data/lib/groonga/query-log.rb +348 -0
- data/lib/groonga/record.rb +47 -143
- data/lib/groonga/schema.rb +679 -406
- data/lib/groonga/view-record.rb +4 -10
- data/rroonga-build.rb +1 -1
- data/test/test-array.rb +25 -4
- data/test/test-column.rb +8 -8
- data/test/test-database.rb +2 -3
- data/test/test-double-array-trie.rb +164 -0
- data/test/test-expression-builder.rb +2 -2
- data/test/test-expression.rb +10 -9
- data/test/test-gqtp.rb +2 -2
- data/test/test-hash.rb +32 -8
- data/test/test-patricia-trie.rb +34 -10
- data/test/test-query-log.rb +258 -0
- data/test/test-record.rb +6 -5
- data/test/test-schema-create-table.rb +8 -0
- data/test/test-schema.rb +491 -234
- data/test/test-table.rb +17 -24
- metadata +123 -100
- data/ext/groonga/Makefile +0 -233
@@ -1,4 +1,4 @@
|
|
1
|
-
/* -*- c-file-style: "ruby" -*- */
|
1
|
+
/* -*- coding: utf-8; c-file-style: "ruby" -*- */
|
2
2
|
/* vim: set sts=4 sw=4 ts=8 noet: */
|
3
3
|
/*
|
4
4
|
Copyright (C) 2009 Kouhei Sutou <kou@clear-code.com>
|
@@ -43,38 +43,45 @@ VALUE rb_cGrnPatriciaTrie;
|
|
43
43
|
* ブロックを指定すると、そのブロックに生成したテーブルが渡さ
|
44
44
|
* れ、ブロックを抜けると自動的にテーブルが破棄される。
|
45
45
|
*
|
46
|
-
* _options_に指定可能な値は以下の通り。
|
46
|
+
* _options_ に指定可能な値は以下の通り。
|
47
|
+
* @param options [::Hash] The name and value
|
48
|
+
* pairs. Omitted names are initialized as the default value.
|
49
|
+
* @option options [Groonga::Context] :context (Groonga::Context.default)
|
47
50
|
*
|
48
|
-
*
|
49
|
-
*
|
50
|
-
*
|
51
|
+
* テーブルが利用するGroonga::Context。
|
52
|
+
*
|
53
|
+
* @option options :name The table name
|
51
54
|
*
|
52
|
-
* [+:name+]
|
53
55
|
* テーブルの名前。名前をつけると、Groonga::Context#[]に名
|
54
56
|
* 前を指定してテーブルを取得することができる。省略すると
|
55
57
|
* 無名テーブルになり、テーブルIDでのみ取得できる。
|
56
58
|
*
|
57
|
-
*
|
59
|
+
* @option options :path The path
|
60
|
+
*
|
58
61
|
* テーブルを保存するパス。パスを指定すると永続テーブルとな
|
59
62
|
* り、プロセス終了後もレコードは保持される。次回起動時に
|
60
63
|
* Groonga::Context#[]で保存されたレコードを利用する
|
61
64
|
* ことができる。省略すると一時テーブルになり、プロセスが終
|
62
65
|
* 了するとレコードは破棄される。
|
63
66
|
*
|
64
|
-
*
|
65
|
-
*
|
66
|
-
*
|
67
|
+
* @option options :persistent The persistent
|
68
|
+
*
|
69
|
+
* +true+ を指定すると永続テーブルとなる。 +path+ を省略した
|
70
|
+
* 場合は自動的にパスが付加される。 +:context+ で指定した
|
67
71
|
* Groonga::Contextに結びついているデータベースが一時デー
|
68
72
|
* タベースの場合は例外が発生する。
|
69
73
|
*
|
70
|
-
*
|
71
|
-
*
|
74
|
+
* @option options :key_normalize The key_normalize
|
75
|
+
*
|
76
|
+
* +true+ を指定するとキーを正規化する。
|
72
77
|
*
|
73
|
-
*
|
74
|
-
*
|
78
|
+
* @option options :key_with_sis The key_with_sis
|
79
|
+
*
|
80
|
+
* +true+ を指定するとキーの文字列の全suffixが自動的に登
|
75
81
|
* 録される。
|
76
82
|
*
|
77
|
-
*
|
83
|
+
* @option options :key_type The key_type
|
84
|
+
*
|
78
85
|
* キーの種類を示すオブジェクトを指定する。キーの種類には型
|
79
86
|
* 名("Int32"や"ShortText"など)またはGroonga::Typeまたは
|
80
87
|
* テーブル(Groonga::Array、Groonga::Hash、
|
@@ -93,60 +100,62 @@ VALUE rb_cGrnPatriciaTrie;
|
|
93
100
|
* 省略した場合はShortText型をキーとして使用する。この場合、
|
94
101
|
* 4096バイトまで使用可能である。
|
95
102
|
*
|
96
|
-
*
|
103
|
+
* @option options :value_type The value_type
|
104
|
+
*
|
97
105
|
* 値の型を指定する。省略すると値のための領域を確保しない。
|
98
106
|
* 値を保存したい場合は必ず指定すること。
|
99
107
|
*
|
100
108
|
* 参考: Groonga::Type.new
|
101
109
|
*
|
102
|
-
*
|
110
|
+
* @option options :default_tokenizer The default_tokenizer
|
111
|
+
*
|
103
112
|
* Groonga::IndexColumnで使用するトークナイザを指定する。
|
104
113
|
* デフォルトでは何も設定されていないので、テーブルに
|
105
114
|
* Groonga::IndexColumnを定義する場合は
|
106
115
|
* <tt>"TokenBigram"</tt>などを指定する必要がある。
|
107
116
|
*
|
108
|
-
*
|
109
|
-
*
|
117
|
+
* @option options :sub_records The sub_records
|
118
|
+
*
|
119
|
+
* +true+ を指定すると#groupでグループ化したときに、
|
110
120
|
* Groonga::Record#n_sub_recordsでグループに含まれるレコー
|
111
121
|
* ドの件数を取得できる。
|
112
122
|
*
|
113
|
-
*
|
114
|
-
*
|
115
|
-
* 無名一時テーブルを生成する。
|
123
|
+
* @example
|
124
|
+
* #無名一時テーブルを生成する。
|
116
125
|
* Groonga::PatriciaTrie.create
|
117
126
|
*
|
118
|
-
*
|
127
|
+
* #無名永続テーブルを生成する。
|
119
128
|
* Groonga::PatriciaTrie.create(:path => "/tmp/hash.grn")
|
120
129
|
*
|
121
|
-
*
|
122
|
-
*
|
130
|
+
* #名前付き永続テーブルを生成する。ただし、ファイル名は気に
|
131
|
+
* #しない。
|
123
132
|
* Groonga::PatriciaTrie.create(:name => "Bookmarks",
|
124
133
|
* :persistent => true)
|
125
134
|
*
|
126
|
-
*
|
127
|
-
*
|
135
|
+
* #それぞれのレコードに512バイトの値を格納できる無名一時テー
|
136
|
+
* #ブルを生成する。
|
128
137
|
* Groonga::PatriciaTrie.create(:value => 512)
|
129
138
|
*
|
130
|
-
*
|
139
|
+
* #キーとして文字列を使用する無名一時テーブルを生成する。
|
131
140
|
* Groonga::PatriciaTrie.create(:key_type => Groonga::Type::SHORT_TEXT)
|
132
141
|
*
|
133
|
-
*
|
134
|
-
*
|
142
|
+
* #キーとして文字列を使用する無名一時テーブルを生成する。
|
143
|
+
* #(キーの種類を表すオブジェクトは文字列で指定。)
|
135
144
|
* Groonga::PatriciaTrie.create(:key_type => "ShortText")
|
136
145
|
*
|
137
|
-
*
|
138
|
-
*
|
146
|
+
* #キーとして<tt>Bookmarks</tt>テーブルのレコードを使用す
|
147
|
+
* #る無名一時テーブルを生成する。
|
139
148
|
* bookmarks = Groonga::PatriciaTrie.create(:name => "Bookmarks")
|
140
149
|
* Groonga::PatriciaTrie.create(:key_type => bookmarks)
|
141
150
|
*
|
142
|
-
*
|
143
|
-
*
|
144
|
-
*
|
151
|
+
* #キーとして<tt>Bookmarks</tt>テーブルのレコードを使用す
|
152
|
+
* #る無名一時テーブルを生成する。
|
153
|
+
* #(テーブルは文字列で指定。)
|
145
154
|
* Groonga::PatriciaTrie.create(:name => "Bookmarks")
|
146
155
|
* Groonga::PatriciaTrie.create(:key_type => "Bookmarks")
|
147
156
|
*
|
148
|
-
*
|
149
|
-
*
|
157
|
+
* #全文検索用のトークンをバイグラムで切り出す無名一時テーブ
|
158
|
+
* #ルを生成する。
|
150
159
|
* bookmarks = Groonga::PatriciaTrie.create(:name => "Bookmarks")
|
151
160
|
* bookmarks.define_column("comment", "Text")
|
152
161
|
* terms = Groonga::PatriciaTrie.create(:name => "Terms",
|
@@ -237,22 +246,24 @@ rb_grn_patricia_trie_s_create (int argc, VALUE *argv, VALUE klass)
|
|
237
246
|
* call-seq:
|
238
247
|
* patricia_trie.search(key, options=nil) -> Groonga::Hash
|
239
248
|
*
|
240
|
-
* _key_にマッチするレコードのIDがキーに入っている
|
249
|
+
* _key_ にマッチするレコードのIDがキーに入っている
|
241
250
|
* Groonga::Hashを返す。マッチするレコードがない場合は空の
|
242
251
|
* Groonga::Hashが返る。
|
243
252
|
*
|
244
|
-
* _options_
|
253
|
+
* _options_ で +:result+ を指定することにより、そのテーブルにマッ
|
245
254
|
* チしたレコードIDがキーのレコードを追加することができる。
|
246
|
-
* +:result
|
255
|
+
* +:result+ にテーブルを指定した場合は、そのテーブルが返る。
|
247
256
|
*
|
248
|
-
* _options_に指定可能な値は以下の通り。
|
257
|
+
* _options_ に指定可能な値は以下の通り。
|
258
|
+
* @param options [::Hash] The name and value
|
259
|
+
* pairs. Omitted names are initialized as the default value.
|
260
|
+
* @option options :result The result
|
249
261
|
*
|
250
|
-
* [+:result+]
|
251
262
|
* 結果を格納するテーブル。
|
263
|
+
* @option options :operator (Groonga::Operator::OR)
|
252
264
|
*
|
253
|
-
* [+:operator+]
|
254
265
|
* マッチしたレコードをどのように扱うか。指定可能な値は以
|
255
|
-
*
|
266
|
+
* 下の通り。
|
256
267
|
*
|
257
268
|
* [Groonga::Operator::OR]
|
258
269
|
* マッチしたレコードを追加。すでにレコードが追加され
|
@@ -332,7 +343,7 @@ rb_grn_patricia_trie_search (int argc, VALUE *argv, VALUE self)
|
|
332
343
|
* patricia_trie.scan(string) -> Array
|
333
344
|
* patricia_trie.scan(string) {|record, word, start, length| ... }
|
334
345
|
*
|
335
|
-
* _string_を走査し、_patricia_trie_内に格納されているキーに
|
346
|
+
* _string_ を走査し、 _patricia_trie_ 内に格納されているキーに
|
336
347
|
* マッチした部分文字列の情報をブロックに渡す。複数のキーが
|
337
348
|
* マッチする場合は最長一致するキーを優先する。
|
338
349
|
*
|
@@ -343,10 +354,10 @@ rb_grn_patricia_trie_search (int argc, VALUE *argv, VALUE self)
|
|
343
354
|
* マッチした部分文字列。
|
344
355
|
*
|
345
356
|
* [_start_]
|
346
|
-
* _string_内での_word_の出現位置。(バイト単位)
|
357
|
+
* _string_ 内での _word_ の出現位置。(バイト単位)
|
347
358
|
*
|
348
359
|
* [_length_]
|
349
|
-
* _word_の長さ。(バイト単位)
|
360
|
+
* _word_ の長さ。(バイト単位)
|
350
361
|
*
|
351
362
|
* ブロックを指定しない場合は、マッチした部分文字列の情報を
|
352
363
|
* まとめて配列として返す。
|
@@ -437,7 +448,7 @@ rb_grn_patricia_trie_scan (VALUE self, VALUE rb_string)
|
|
437
448
|
* call-seq:
|
438
449
|
* patricia_trie.prefix_search(prefix) -> Groonga::Hash
|
439
450
|
*
|
440
|
-
* キーが_prefix_に前方一致するレコードのIDがキーに入っている
|
451
|
+
* キーが _prefix_ に前方一致するレコードのIDがキーに入っている
|
441
452
|
* Groonga::Hashを返す。マッチするレコードがない場合は空の
|
442
453
|
* Groonga::Hashが返る。
|
443
454
|
*
|
@@ -476,7 +487,7 @@ rb_grn_patricia_trie_prefix_search (VALUE self, VALUE rb_prefix)
|
|
476
487
|
* table.register_key_with_sis? -> true/false
|
477
488
|
*
|
478
489
|
* キーを登録するときに文字列の全suffixも一緒に登録する場合
|
479
|
-
*
|
490
|
+
* は +true+ 、登録しない場合は +false+ を返す。
|
480
491
|
*/
|
481
492
|
static VALUE
|
482
493
|
rb_grn_patricia_trie_register_key_with_sis_p (VALUE self)
|
@@ -591,44 +602,52 @@ rb_grn_patricia_trie_open_grn_prefix_cursor (int argc, VALUE *argv, VALUE self,
|
|
591
602
|
* table.open_prefix_cursor(prefix, options={}) -> Groonga::PatriciaTrieCursor
|
592
603
|
* table.open_prefix_cursor(prefix, options={}) {|cursor| ... }
|
593
604
|
*
|
594
|
-
* _prefix_に前方一致検索をするカーソルを生成して返す。ブロッ
|
605
|
+
* _prefix_ に前方一致検索をするカーソルを生成して返す。ブロッ
|
595
606
|
* クを指定すると、そのブロックに生成したカーソルが渡され、ブ
|
596
607
|
* ロックを抜けると自動的にカーソルが破棄される。
|
597
608
|
*
|
598
|
-
* _options_に指定可能な値は以下の通り。
|
609
|
+
* _options_ に指定可能な値は以下の通り。
|
610
|
+
* @param options [::Hash] The name and value
|
611
|
+
* pairs. Omitted names are initialized as the default value.
|
612
|
+
* @option options :key_bytes The key_bytes
|
599
613
|
*
|
600
|
-
*
|
601
|
-
* _prefix_のサイズ(byte)
|
614
|
+
* _prefix_ のサイズ(byte)
|
602
615
|
*
|
603
|
-
*
|
604
|
-
* _prefix_のサイズ(bit)
|
616
|
+
* @option options :key_bits The key_bits
|
605
617
|
*
|
606
|
-
*
|
607
|
-
*
|
618
|
+
* _prefix_ のサイズ(bit)
|
619
|
+
*
|
620
|
+
* @option options :offset The offset
|
621
|
+
*
|
622
|
+
* 該当する範囲のレコードのうち、(0ベースで) _:offset_ 番目
|
608
623
|
* からレコードを取り出す。
|
609
624
|
*
|
610
|
-
*
|
611
|
-
*
|
625
|
+
* @option options :limit The limit
|
626
|
+
*
|
627
|
+
* 該当する範囲のレコードのうち、 _:limit_ 件のみを取り出す。
|
612
628
|
* 省略された場合または-1が指定された場合は、全件が指定され
|
613
629
|
* たものとみなす。
|
614
630
|
*
|
615
|
-
*
|
616
|
-
*
|
631
|
+
* @option options :order The order
|
632
|
+
*
|
633
|
+
* +:asc+ または +:ascending+ を指定すると昇順にレコードを取
|
617
634
|
* り出す。
|
618
|
-
* +:desc
|
635
|
+
* +:desc+ または +:descending+ を指定すると降順にレコードを
|
619
636
|
* 取り出す。
|
620
637
|
*
|
621
|
-
*
|
622
|
-
* +:id+を指定するとID順にレコードを取り出す。(デフォルト)
|
638
|
+
* @option options :order_by (:id) The order_by
|
623
639
|
*
|
640
|
+
* +:id+ を指定するとID順にレコードを取り出す。(デフォルト)
|
624
641
|
* +:key+指定するとキー順にレコードを取り出す。
|
625
642
|
*
|
626
|
-
*
|
627
|
-
*
|
643
|
+
* @option options :greater_than The greater_than
|
644
|
+
*
|
645
|
+
* +true+ を指定すると _prefix_ で指定した値に一致した [ +key+ ] を
|
628
646
|
* 範囲に含まない。
|
629
647
|
*
|
630
|
-
*
|
631
|
-
*
|
648
|
+
* @option options :less_than The less_than
|
649
|
+
*
|
650
|
+
* +true+ を指定すると _prefix_ で指定した値に一致した [ +key+ ] を
|
632
651
|
* 範囲に含まない。
|
633
652
|
*/
|
634
653
|
static VALUE
|
@@ -714,36 +733,43 @@ rb_grn_patricia_trie_open_grn_rk_cursor (int argc, VALUE *argv, VALUE self,
|
|
714
733
|
* table.open_rk_cursor(key, options={}) -> Groonga::PatriciaTrieCursor
|
715
734
|
* table.open_rk_cursor(key, options={}) {|cursor| ... }
|
716
735
|
*
|
717
|
-
* _table_のキーはカタカナである必要がある。また、エンコーディ
|
718
|
-
* ングはUTF-8である必要がある。ローマ字やひらがなで_key_を指
|
719
|
-
* 定しても、_key_に対応するカタカナのキーを検索するカーソル
|
736
|
+
* _table_ のキーはカタカナである必要がある。また、エンコーディ
|
737
|
+
* ングはUTF-8である必要がある。ローマ字やひらがなで _key_ を指
|
738
|
+
* 定しても、 _key_ に対応するカタカナのキーを検索するカーソル
|
720
739
|
* を生成して返す。ブロックを指定すると、そのブロックに生成し
|
721
740
|
* たカーソルが渡され、ブロックを抜けると自動的にカーソルが破
|
722
741
|
* 棄される。
|
723
742
|
*
|
724
|
-
* _options_に指定可能な値は以下の通り。
|
743
|
+
* _options_ に指定可能な値は以下の通り。
|
744
|
+
* @param options [::Hash] The name and value
|
745
|
+
* pairs. Omitted names are initialized as the default value.
|
746
|
+
* @option options :key_bytes The key_bytes
|
725
747
|
*
|
726
|
-
* [+:key_bytes+]
|
727
748
|
* _key_のサイズ(byte)
|
728
749
|
*
|
729
|
-
*
|
750
|
+
* @option options :key_bits The key_bits
|
751
|
+
*
|
730
752
|
* _key_のサイズ(bit)(現在は未サポート)
|
731
753
|
*
|
732
|
-
*
|
754
|
+
* @option options :offset The offset
|
755
|
+
*
|
733
756
|
* 該当する範囲のレコードのうち、(0ベースで)_:offset_番目
|
734
757
|
* からレコードを取り出す。
|
735
758
|
*
|
736
|
-
*
|
737
|
-
*
|
759
|
+
* @option options :limit The limit
|
760
|
+
*
|
761
|
+
* 該当する範囲のレコードのうち、 _:limit_ 件のみを取り出す。
|
738
762
|
* 省略された場合または-1が指定された場合は、全件が指定され
|
739
763
|
* たものとみなす。
|
740
764
|
*
|
741
|
-
*
|
742
|
-
*
|
765
|
+
* @option options :greater_than The greater_than
|
766
|
+
*
|
767
|
+
* +true+ を指定すると _key_ で指定した値に一致した [ +key+ ] を
|
743
768
|
* 範囲に含まない。
|
744
769
|
*
|
745
|
-
*
|
746
|
-
*
|
770
|
+
* @option options :less_than The less_than
|
771
|
+
*
|
772
|
+
* +true+ を指定すると _key_ で指定した値に一致した [ +key+ ] を
|
747
773
|
* 範囲に含まない。
|
748
774
|
*/
|
749
775
|
static VALUE
|
@@ -829,30 +855,36 @@ rb_grn_patricia_trie_open_grn_near_cursor (int argc, VALUE *argv, VALUE self,
|
|
829
855
|
* table.open_near_cursor(key, options={}) -> Groonga::PatriciaTrieCursor
|
830
856
|
* table.open_near_cursor(key, options={}) {|cursor| ... }
|
831
857
|
*
|
832
|
-
* _key_に近い順にレコードを取り出すカーソルを生成して返す。
|
858
|
+
* _key_ に近い順にレコードを取り出すカーソルを生成して返す。
|
833
859
|
* ブロックを指定すると、そのブロックに生成したカーソルが渡さ
|
834
860
|
* れ、ブロックを抜けると自動的にカーソルが破棄される。
|
835
861
|
*
|
836
|
-
* _options_に指定可能な値は以下の通り。
|
862
|
+
* _options_ に指定可能な値は以下の通り。
|
863
|
+
* @param options [::Hash] The name and value
|
864
|
+
* pairs. Omitted names are initialized as the default value.
|
865
|
+
* @option options :size The size
|
837
866
|
*
|
838
|
-
* [+:size+]
|
839
867
|
* _size_バイト以降のデータが同じキーのレコードに限定する。
|
840
868
|
*
|
841
|
-
*
|
869
|
+
* @option options :offset The offset
|
870
|
+
*
|
842
871
|
* 該当する範囲のレコードのうち、(0ベースで)_:offset_番目
|
843
872
|
* からレコードを取り出す。
|
844
873
|
*
|
845
|
-
*
|
874
|
+
* @option options :limit The limit
|
875
|
+
*
|
846
876
|
* 該当する範囲のレコードのうち、_:limit_件のみを取り出す。
|
847
877
|
* 省略された場合または-1が指定された場合は、全件が指定され
|
848
878
|
* たものとみなす。
|
849
879
|
*
|
850
|
-
*
|
851
|
-
*
|
880
|
+
* @option options :greater_than The greater_than
|
881
|
+
*
|
882
|
+
* +true+ を指定すると _key_ で指定した値に一致した [ +key+ ] を
|
852
883
|
* 範囲に含まない。
|
853
884
|
*
|
854
|
-
*
|
855
|
-
*
|
885
|
+
* @option options :less_than
|
886
|
+
*
|
887
|
+
* +true+ を指定すると _key_ で指定した値に一致した [ +key+ ] を
|
856
888
|
* 範囲に含まない。
|
857
889
|
*/
|
858
890
|
static VALUE
|
data/ext/groonga/rb-grn-plugin.c
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/* -*- c-file-style: "ruby" -*- */
|
1
|
+
/* -*- coding: utf-8; c-file-style: "ruby" -*- */
|
2
2
|
/*
|
3
3
|
Copyright (C) 2011 Kouhei Sutou <kou@clear-code.com>
|
4
4
|
|
@@ -71,16 +71,17 @@ rb_grn_plugin_alloc (VALUE klass)
|
|
71
71
|
*
|
72
72
|
* 既存のプラグインをデータベースに登録する。
|
73
73
|
*
|
74
|
-
* _name_を指定した場合はその名前のプラグインを登録する。
|
74
|
+
* _name_ を指定した場合はその名前のプラグインを登録する。
|
75
75
|
*
|
76
|
-
* _path_を指定した場合はそのパスのプラグインを登録する。
|
76
|
+
* _path_ を指定した場合はそのパスのプラグインを登録する。
|
77
77
|
*
|
78
|
-
* _options_にはハッシュでオプションを指定する。指定できるオ
|
78
|
+
* _options_ にはハッシュでオプションを指定する。指定できるオ
|
79
79
|
* プションは以下の通り。
|
80
|
+
* @param options [::Hash] The name and value
|
81
|
+
* pairs. Omitted names are initialized as the default value.
|
82
|
+
* @option options :context (Groonga::Context.default) The context
|
80
83
|
*
|
81
|
-
*
|
82
|
-
* データベースを結びつけるコンテキスト。省略すると
|
83
|
-
* Groonga::Context.defaultを利用する。
|
84
|
+
* データベースを結びつけるコンテキスト。
|
84
85
|
*/
|
85
86
|
static VALUE
|
86
87
|
rb_grn_plugin_s_register (int argc, VALUE *argv, VALUE klass)
|