rroonga 4.0.5 → 4.0.6
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.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/benchmark/common.rb +4 -4
- data/benchmark/create-wikipedia-database.rb +5 -5
- data/benchmark/read-write-many-small-items.rb +8 -8
- data/benchmark/repeat-load.rb +4 -4
- data/benchmark/select.rb +9 -9
- data/benchmark/write-many-small-items.rb +8 -8
- data/doc/images/sample-schema.png +0 -0
- data/doc/text/install.textile +2 -2
- data/doc/text/news.textile +41 -0
- data/doc/text/tutorial.textile +4 -4
- data/example/bookmark.rb +6 -7
- data/example/index-html.rb +6 -6
- data/ext/groonga/extconf.rb +23 -1
- data/ext/groonga/rb-grn-column.c +3 -2
- data/ext/groonga/rb-grn-context.c +20 -3
- data/ext/groonga/rb-grn-double-array-trie.c +11 -2
- data/ext/groonga/rb-grn-exception.c +28 -10
- data/ext/groonga/rb-grn-expression.c +78 -0
- data/ext/groonga/rb-grn-hash.c +10 -0
- data/ext/groonga/rb-grn-logger.c +7 -3
- data/ext/groonga/rb-grn-object.c +3 -2
- data/ext/groonga/rb-grn-patricia-trie.c +23 -20
- data/ext/groonga/rb-grn-table-key-support.c +92 -1
- data/ext/groonga/rb-grn-table.c +60 -17
- data/ext/groonga/rb-grn-utils.c +51 -2
- data/ext/groonga/rb-grn-variable-size-column.c +11 -7
- data/ext/groonga/rb-grn.h +11 -1
- data/lib/groonga/dumper.rb +23 -1
- data/lib/groonga/patricia-trie.rb +1 -1
- data/lib/groonga/schema.rb +190 -205
- data/misc/grnop2ruby.rb +1 -1
- data/rroonga-build.rb +3 -3
- data/rroonga.gemspec +1 -0
- data/test/groonga-test-utils.rb +2 -2
- data/test/test-column.rb +19 -0
- data/test/test-context.rb +5 -1
- data/test/test-double-array-trie.rb +19 -0
- data/test/test-exception.rb +7 -2
- data/test/test-expression.rb +19 -0
- data/test/test-fix-size-column.rb +49 -36
- data/test/test-hash.rb +22 -0
- data/test/test-patricia-trie.rb +26 -7
- data/test/test-schema-dumper.rb +65 -1
- data/test/test-schema.rb +13 -2
- data/test/test-variable-size-column.rb +6 -5
- metadata +47 -46
data/test/test-schema.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# Copyright (C) 2009-2014 Kouhei Sutou <kou@clear-code.com>
|
2
|
+
# Copyright (C) 2014 Masafumi Yokoyama <myokoym@gmail.com>
|
2
3
|
#
|
3
4
|
# This library is free software; you can redistribute it and/or
|
4
5
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -90,14 +91,17 @@ class SchemaTest < Test::Unit::TestCase
|
|
90
91
|
end
|
91
92
|
|
92
93
|
def test_full_option
|
94
|
+
context.register_plugin("token_filters/stop_word")
|
93
95
|
path = @tmp_dir + "hash.groonga"
|
94
96
|
tokenizer = context["TokenTrigram"]
|
97
|
+
token_filter = context["TokenFilterStopWord"]
|
95
98
|
Groonga::Schema.create_table("Posts",
|
96
99
|
:type => :hash,
|
97
100
|
:key_type => "integer",
|
98
101
|
:path => path.to_s,
|
99
102
|
:value_type => "UInt32",
|
100
103
|
:default_tokenizer => tokenizer,
|
104
|
+
:token_filters => [token_filter],
|
101
105
|
:named_path => true) do |table|
|
102
106
|
end
|
103
107
|
table = context["Posts"]
|
@@ -111,6 +115,7 @@ class SchemaTest < Test::Unit::TestCase
|
|
111
115
|
"size: <0>, " +
|
112
116
|
"encoding: <#{Groonga::Encoding.default.inspect}>, " +
|
113
117
|
"default_tokenizer: <#{tokenizer.name}>, " +
|
118
|
+
"token_filters: [<#{token_filter.name}>], " +
|
114
119
|
"normalizer: (nil)>",
|
115
120
|
table.inspect)
|
116
121
|
end
|
@@ -148,6 +153,7 @@ class SchemaTest < Test::Unit::TestCase
|
|
148
153
|
end
|
149
154
|
|
150
155
|
def test_full_option
|
156
|
+
context.register_plugin("token_filters/stop_word")
|
151
157
|
path = @tmp_dir + "patricia-trie.groonga"
|
152
158
|
Groonga::Schema.create_table("Posts",
|
153
159
|
:type => :patricia_trie,
|
@@ -155,6 +161,7 @@ class SchemaTest < Test::Unit::TestCase
|
|
155
161
|
:path => path.to_s,
|
156
162
|
:value_type => "Float",
|
157
163
|
:default_tokenizer => "TokenBigram",
|
164
|
+
:token_filters => ["TokenFilterStopWord"],
|
158
165
|
:key_with_sis => true,
|
159
166
|
:named_path => true,
|
160
167
|
:normalizer => "NormalizerAuto") do |table|
|
@@ -170,6 +177,7 @@ class SchemaTest < Test::Unit::TestCase
|
|
170
177
|
"size: <0>, " +
|
171
178
|
"encoding: <#{Groonga::Encoding.default.inspect}>, " +
|
172
179
|
"default_tokenizer: <TokenBigram>, " +
|
180
|
+
"token_filters: [<TokenFilterStopWord>], " +
|
173
181
|
"normalizer: <NormalizerAuto>>",
|
174
182
|
table.inspect)
|
175
183
|
end
|
@@ -208,6 +216,7 @@ class SchemaTest < Test::Unit::TestCase
|
|
208
216
|
end
|
209
217
|
|
210
218
|
def test_full_option
|
219
|
+
context.register_plugin("token_filters/stop_word")
|
211
220
|
path = @tmp_dir + "double-array-trie.groonga"
|
212
221
|
Groonga::Schema.create_table("Posts",
|
213
222
|
:type => :double_array_trie,
|
@@ -215,6 +224,7 @@ class SchemaTest < Test::Unit::TestCase
|
|
215
224
|
:path => path.to_s,
|
216
225
|
:value_type => "Float",
|
217
226
|
:default_tokenizer => "TokenBigram",
|
227
|
+
:token_filters => ["TokenFilterStopWord"],
|
218
228
|
:named_path => true,
|
219
229
|
:normalizer => "NormalizerAuto") do |table|
|
220
230
|
end
|
@@ -229,6 +239,7 @@ class SchemaTest < Test::Unit::TestCase
|
|
229
239
|
"size: <0>, " +
|
230
240
|
"encoding: <#{Groonga::Encoding.default.inspect}>, " +
|
231
241
|
"default_tokenizer: <TokenBigram>, " +
|
242
|
+
"token_filters: [<TokenFilterStopWord>], " +
|
232
243
|
"normalizer: <NormalizerAuto>>",
|
233
244
|
table.inspect)
|
234
245
|
end
|
@@ -330,7 +341,7 @@ class SchemaTest < Test::Unit::TestCase
|
|
330
341
|
:path => path.to_s,
|
331
342
|
:persistent => true,
|
332
343
|
:type => :vector,
|
333
|
-
:compress => :
|
344
|
+
:compress => :lz4)
|
334
345
|
end
|
335
346
|
|
336
347
|
column_name = "Posts.rate"
|
@@ -341,7 +352,7 @@ class SchemaTest < Test::Unit::TestCase
|
|
341
352
|
"path: <#{path}>, " +
|
342
353
|
"domain: <Posts>, " +
|
343
354
|
"range: <Niku>, " +
|
344
|
-
"flags: <KEY_VAR_SIZE|
|
355
|
+
"flags: <KEY_VAR_SIZE|COMPRESS_LZ4>>",
|
345
356
|
column.inspect)
|
346
357
|
end
|
347
358
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# Copyright (C) 2009-2014 Kouhei Sutou <kou@clear-code.com>
|
2
|
+
# Copyright (C) 2014 Masafumi Yokoyama <myokoym@gmail.com>
|
2
3
|
#
|
3
4
|
# This library is free software; you can redistribute it and/or
|
4
5
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -85,13 +86,13 @@ class VariableSizeColumnTest < Test::Unit::TestCase
|
|
85
86
|
end
|
86
87
|
end
|
87
88
|
|
88
|
-
def
|
89
|
+
def test_compressed_lz4?
|
89
90
|
description = @users.define_column("description", "ShortText",
|
90
|
-
:compress => :
|
91
|
-
if context.
|
92
|
-
assert {description.compressed?(:
|
91
|
+
:compress => :lz4)
|
92
|
+
if context.support_lz4?
|
93
|
+
assert {description.compressed?(:lz4)}
|
93
94
|
else
|
94
|
-
assert {not description.compressed?(:
|
95
|
+
assert {not description.compressed?(:lz4)}
|
95
96
|
end
|
96
97
|
end
|
97
98
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rroonga
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2014-
|
15
|
+
date: 2014-11-06 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: pkg-config
|
@@ -194,10 +194,10 @@ email:
|
|
194
194
|
- y.hayamizu@gmail.com
|
195
195
|
- dara@shidara.net
|
196
196
|
executables:
|
197
|
-
- grndump
|
198
197
|
- groonga-index-dump
|
199
|
-
-
|
198
|
+
- grndump
|
200
199
|
- groonga-database-inspect
|
200
|
+
- grntest-log-analyze
|
201
201
|
extensions:
|
202
202
|
- ext/groonga/extconf.rb
|
203
203
|
extra_rdoc_files:
|
@@ -218,6 +218,7 @@ files:
|
|
218
218
|
- bin/grntest-log-analyze
|
219
219
|
- bin/groonga-database-inspect
|
220
220
|
- bin/groonga-index-dump
|
221
|
+
- doc/images/sample-schema.png
|
221
222
|
- doc/text/install.textile
|
222
223
|
- doc/text/news.textile
|
223
224
|
- doc/text/tutorial.textile
|
@@ -374,57 +375,57 @@ specification_version: 4
|
|
374
375
|
summary: Ruby bindings for Groonga that provide full text search and column store
|
375
376
|
features.
|
376
377
|
test_files:
|
377
|
-
- test/test-
|
378
|
-
- test/test-
|
379
|
-
- test/test-table-select-normalize.rb
|
380
|
-
- test/test-procedure.rb
|
381
|
-
- test/test-context.rb
|
382
|
-
- test/test-remote.rb
|
383
|
-
- test/test-table-select-mecab.rb
|
384
|
-
- test/test-memory-pool.rb
|
385
|
-
- test/test-patricia-trie.rb
|
386
|
-
- test/test-schema-type.rb
|
387
|
-
- test/test-table-offset-and-limit.rb
|
388
|
-
- test/test-double-array-trie.rb
|
389
|
-
- test/test-schema-create-table.rb
|
390
|
-
- test/test-array.rb
|
378
|
+
- test/test-schema.rb
|
379
|
+
- test/test-snippet.rb
|
391
380
|
- test/test-variable.rb
|
392
|
-
- test/test-index-cursor.rb
|
393
|
-
- test/test-sub-records.rb
|
394
|
-
- test/test-plugin.rb
|
395
|
-
- test/test-type.rb
|
396
381
|
- test/test-geo-point.rb
|
397
|
-
- test/test-
|
398
|
-
- test/test-schema-dumper.rb
|
382
|
+
- test/test-plugin.rb
|
399
383
|
- test/test-accessor.rb
|
400
|
-
- test/test-
|
401
|
-
- test/test-version.rb
|
402
|
-
- test/test-expression-builder.rb
|
403
|
-
- test/test-variable-size-column.rb
|
404
|
-
- test/test-encoding.rb
|
384
|
+
- test/test-double-array-trie.rb
|
405
385
|
- test/test-pagination.rb
|
386
|
+
- test/test-memory-pool.rb
|
387
|
+
- test/test-column.rb
|
406
388
|
- test/test-table-traverse.rb
|
407
|
-
- test/test-database-dumper.rb
|
408
|
-
- test/test-exception.rb
|
409
|
-
- test/test-normalizer.rb
|
410
|
-
- test/test-table-dumper.rb
|
411
|
-
- test/test-database.rb
|
412
|
-
- test/test-database-inspector.rb
|
413
|
-
- test/test-schema.rb
|
414
|
-
- test/test-fix-size-column.rb
|
415
389
|
- test/test-expression.rb
|
416
|
-
- test/test-
|
390
|
+
- test/test-table-select.rb
|
391
|
+
- test/test-encoding.rb
|
392
|
+
- test/test-logger.rb
|
393
|
+
- test/test-schema-create-table.rb
|
417
394
|
- test/test-hash.rb
|
418
|
-
- test/
|
395
|
+
- test/test-type.rb
|
396
|
+
- test/test-table-offset-and-limit.rb
|
397
|
+
- test/test-version.rb
|
398
|
+
- test/test-lock-timeout.rb
|
399
|
+
- test/test-index-column.rb
|
419
400
|
- test/test-table-key-support.rb
|
420
|
-
- test/test-table.rb
|
421
401
|
- test/test-vector-column.rb
|
422
|
-
- test/test-
|
423
|
-
- test/test-
|
402
|
+
- test/test-normalizer.rb
|
403
|
+
- test/test-table-select-weight.rb
|
404
|
+
- test/test-schema-type.rb
|
405
|
+
- test/test-sub-records.rb
|
406
|
+
- test/test-procedure.rb
|
407
|
+
- test/test-context.rb
|
408
|
+
- test/test-gqtp.rb
|
409
|
+
- test/test-remote.rb
|
410
|
+
- test/test-database-dumper.rb
|
411
|
+
- test/test-database-inspector.rb
|
412
|
+
- test/test-patricia-trie.rb
|
413
|
+
- test/run-test.rb
|
414
|
+
- test/test-fix-size-column.rb
|
415
|
+
- test/test-statistic-measurer.rb
|
416
|
+
- test/test-array.rb
|
417
|
+
- test/test-table.rb
|
418
|
+
- test/groonga-test-utils.rb
|
424
419
|
- test/test-record.rb
|
420
|
+
- test/test-exception.rb
|
421
|
+
- test/test-table-select-normalize.rb
|
422
|
+
- test/test-schema-dumper.rb
|
423
|
+
- test/test-table-dumper.rb
|
424
|
+
- test/test-database.rb
|
425
|
+
- test/test-variable-size-column.rb
|
426
|
+
- test/test-table-select-mecab.rb
|
427
|
+
- test/test-expression-builder.rb
|
425
428
|
- test/test-convert.rb
|
426
|
-
- test/test-
|
427
|
-
- test/
|
428
|
-
- test/test-lock-timeout.rb
|
429
|
-
- test/test-snippet.rb
|
429
|
+
- test/test-index-cursor.rb
|
430
|
+
- test/test-command-select.rb
|
430
431
|
has_rdoc:
|