rroonga 4.0.5 → 4.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/benchmark/common.rb +4 -4
  4. data/benchmark/create-wikipedia-database.rb +5 -5
  5. data/benchmark/read-write-many-small-items.rb +8 -8
  6. data/benchmark/repeat-load.rb +4 -4
  7. data/benchmark/select.rb +9 -9
  8. data/benchmark/write-many-small-items.rb +8 -8
  9. data/doc/images/sample-schema.png +0 -0
  10. data/doc/text/install.textile +2 -2
  11. data/doc/text/news.textile +41 -0
  12. data/doc/text/tutorial.textile +4 -4
  13. data/example/bookmark.rb +6 -7
  14. data/example/index-html.rb +6 -6
  15. data/ext/groonga/extconf.rb +23 -1
  16. data/ext/groonga/rb-grn-column.c +3 -2
  17. data/ext/groonga/rb-grn-context.c +20 -3
  18. data/ext/groonga/rb-grn-double-array-trie.c +11 -2
  19. data/ext/groonga/rb-grn-exception.c +28 -10
  20. data/ext/groonga/rb-grn-expression.c +78 -0
  21. data/ext/groonga/rb-grn-hash.c +10 -0
  22. data/ext/groonga/rb-grn-logger.c +7 -3
  23. data/ext/groonga/rb-grn-object.c +3 -2
  24. data/ext/groonga/rb-grn-patricia-trie.c +23 -20
  25. data/ext/groonga/rb-grn-table-key-support.c +92 -1
  26. data/ext/groonga/rb-grn-table.c +60 -17
  27. data/ext/groonga/rb-grn-utils.c +51 -2
  28. data/ext/groonga/rb-grn-variable-size-column.c +11 -7
  29. data/ext/groonga/rb-grn.h +11 -1
  30. data/lib/groonga/dumper.rb +23 -1
  31. data/lib/groonga/patricia-trie.rb +1 -1
  32. data/lib/groonga/schema.rb +190 -205
  33. data/misc/grnop2ruby.rb +1 -1
  34. data/rroonga-build.rb +3 -3
  35. data/rroonga.gemspec +1 -0
  36. data/test/groonga-test-utils.rb +2 -2
  37. data/test/test-column.rb +19 -0
  38. data/test/test-context.rb +5 -1
  39. data/test/test-double-array-trie.rb +19 -0
  40. data/test/test-exception.rb +7 -2
  41. data/test/test-expression.rb +19 -0
  42. data/test/test-fix-size-column.rb +49 -36
  43. data/test/test-hash.rb +22 -0
  44. data/test/test-patricia-trie.rb +26 -7
  45. data/test/test-schema-dumper.rb +65 -1
  46. data/test/test-schema.rb +13 -2
  47. data/test/test-variable-size-column.rb +6 -5
  48. metadata +47 -46
@@ -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 => :lzo)
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|COMPRESS_LZO>>",
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 test_compressed_lzo?
89
+ def test_compressed_lz4?
89
90
  description = @users.define_column("description", "ShortText",
90
- :compress => :lzo)
91
- if context.support_lzo?
92
- assert {description.compressed?(:lzo)}
91
+ :compress => :lz4)
92
+ if context.support_lz4?
93
+ assert {description.compressed?(:lz4)}
93
94
  else
94
- assert {not description.compressed?(:lzo)}
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.5
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-10-05 00:00:00.000000000 Z
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
- - grntest-log-analyze
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-table-select-weight.rb
378
- - test/test-statistic-measurer.rb
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-command-select.rb
398
- - test/test-schema-dumper.rb
382
+ - test/test-plugin.rb
399
383
  - test/test-accessor.rb
400
- - test/test-logger.rb
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-gqtp.rb
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/groonga-test-utils.rb
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-table-select.rb
423
- - test/test-index-column.rb
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-column.rb
427
- - test/run-test.rb
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: