rroonga 9.0.2 → 10.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 -0
- data/Rakefile +9 -142
- data/doc/text/news.md +73 -1
- data/doc/text/tutorial.md +1 -1
- data/ext/groonga/extconf.rb +9 -74
- data/ext/groonga/rb-grn-context.c +27 -0
- data/ext/groonga/rb-grn-expression-builder.c +3 -3
- data/ext/groonga/rb-grn-flushable.c +7 -0
- data/ext/groonga/rb-grn-index-column.c +28 -0
- data/ext/groonga/rb-grn-index-cursor.c +19 -0
- data/ext/groonga/rb-grn-logger.c +17 -3
- data/ext/groonga/rb-grn-object.c +236 -22
- data/ext/groonga/rb-grn-table-key-support.c +26 -7
- data/ext/groonga/rb-grn-table.c +119 -87
- data/ext/groonga/rb-grn-type.c +5 -1
- data/ext/groonga/rb-grn-utils.c +17 -1
- data/ext/groonga/rb-grn.h +7 -13
- data/ext/groonga/rb-groonga.c +2 -2
- data/lib/groonga.rb +3 -7
- data/lib/groonga/dumper.rb +3 -0
- data/lib/groonga/record.rb +2 -2
- data/rroonga.gemspec +4 -5
- data/test/groonga-test-utils.rb +34 -5
- data/test/run-test.rb +1 -3
- data/test/test-accessor.rb +63 -7
- data/test/test-column.rb +12 -1
- data/test/test-context.rb +25 -0
- data/test/test-exception.rb +5 -0
- data/test/test-flushable.rb +51 -6
- data/test/test-index-column.rb +67 -6
- data/test/test-index-cursor.rb +26 -0
- data/test/test-logger.rb +56 -11
- data/test/test-plugin.rb +1 -0
- data/test/test-query-logger.rb +4 -3
- data/test/test-record.rb +2 -1
- data/test/test-remote.rb +56 -10
- data/test/test-schema-dumper.rb +13 -0
- data/test/test-schema.rb +9 -1
- data/test/test-table-arrow.rb +1 -1
- data/test/test-table.rb +21 -1
- data/test/test-variable.rb +23 -7
- metadata +65 -106
data/test/test-schema-dumper.rb
CHANGED
@@ -395,6 +395,19 @@ column_create Terms Items_title COLUMN_INDEX|WITH_POSITION|INDEX_MEDIUM Items ti
|
|
395
395
|
SCHEMA
|
396
396
|
end
|
397
397
|
|
398
|
+
def test_large_index
|
399
|
+
define_index_schema(:title_index_options => {:size => :large})
|
400
|
+
assert_equal(<<-SCHEMA, dump)
|
401
|
+
table_create Items TABLE_HASH_KEY ShortText
|
402
|
+
column_create Items title COLUMN_SCALAR ShortText
|
403
|
+
|
404
|
+
table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --token_filters TokenFilterStopWord --normalizer NormalizerAuto
|
405
|
+
|
406
|
+
column_create Terms Items__key COLUMN_INDEX|WITH_POSITION Items _key
|
407
|
+
column_create Terms Items_title COLUMN_INDEX|WITH_POSITION|INDEX_LARGE Items title
|
408
|
+
SCHEMA
|
409
|
+
end
|
410
|
+
|
398
411
|
def test_weight_vector
|
399
412
|
define_weight_vector_schema
|
400
413
|
assert_equal(<<-SCHEMA, dump)
|
data/test/test-schema.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2009-
|
1
|
+
# Copyright (C) 2009-2020 Kouhei Sutou <kou@clear-code.com>
|
2
2
|
# Copyright (C) 2014 Masafumi Yokoyama <myokoym@gmail.com>
|
3
3
|
#
|
4
4
|
# This library is free software; you can redistribute it and/or
|
@@ -920,6 +920,14 @@ class SchemaTest < Test::Unit::TestCase
|
|
920
920
|
end
|
921
921
|
end
|
922
922
|
|
923
|
+
def test_normalizer_with_options
|
924
|
+
Groonga::Schema.create_table("Names",
|
925
|
+
key_type: :short_text,
|
926
|
+
normalizer: "NormalizerNFKC121('unify_kana', true)")
|
927
|
+
assert_equal(Groonga["NormalizerNFKC121"],
|
928
|
+
Groonga["Names"].normalizer)
|
929
|
+
end
|
930
|
+
|
923
931
|
private
|
924
932
|
def columns_directory_path(table)
|
925
933
|
"#{table.path}.columns"
|
data/test/test-table-arrow.rb
CHANGED
data/test/test-table.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2009-
|
1
|
+
# Copyright (C) 2009-2019 Kouhei Sutou <kou@clear-code.com>
|
2
2
|
# Copyright (C) 2016 Masafumi Yokoyama <yokoyama@clear-code.com>
|
3
3
|
#
|
4
4
|
# This library is free software; you can redistribute it and/or
|
@@ -276,6 +276,25 @@ class TableTest < Test::Unit::TestCase
|
|
276
276
|
bookmark["created_at"].to_a)
|
277
277
|
end
|
278
278
|
|
279
|
+
sub_test_case "#support_score?" do
|
280
|
+
setup
|
281
|
+
def setup_table
|
282
|
+
@table = Groonga::Hash.create(:name => "Bookmarks")
|
283
|
+
end
|
284
|
+
|
285
|
+
test "true" do
|
286
|
+
assert do
|
287
|
+
@table.select.support_score?
|
288
|
+
end
|
289
|
+
end
|
290
|
+
|
291
|
+
test "false" do
|
292
|
+
assert do
|
293
|
+
not @table.support_score?
|
294
|
+
end
|
295
|
+
end
|
296
|
+
end
|
297
|
+
|
279
298
|
class DeleteTest < self
|
280
299
|
setup
|
281
300
|
def setup_data
|
@@ -738,6 +757,7 @@ class TableTest < Test::Unit::TestCase
|
|
738
757
|
|
739
758
|
private
|
740
759
|
def by_other_process
|
760
|
+
only_not_windows
|
741
761
|
pid = Process.fork do
|
742
762
|
yield
|
743
763
|
end
|
data/test/test-variable.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2009 Kouhei
|
1
|
+
# Copyright (C) 2009-2019 Sutou Kouhei <kou@clear-code.com>
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -16,13 +16,29 @@
|
|
16
16
|
class VariableTest < Test::Unit::TestCase
|
17
17
|
include GroongaTestUtils
|
18
18
|
|
19
|
-
setup
|
19
|
+
def setup
|
20
|
+
setup_database
|
21
|
+
@expression = Groonga::Expression.new
|
22
|
+
@variable = @expression.define_variable
|
23
|
+
end
|
20
24
|
|
21
25
|
def test_value
|
22
|
-
|
23
|
-
variable =
|
24
|
-
|
25
|
-
|
26
|
-
|
26
|
+
assert_nil(@variable.value)
|
27
|
+
@variable.value = "morita"
|
28
|
+
assert_equal("morita", @variable.value)
|
29
|
+
end
|
30
|
+
|
31
|
+
sub_test_case("#bulk?") do
|
32
|
+
def test_true
|
33
|
+
assert do
|
34
|
+
@variable.bulk?
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_false
|
39
|
+
assert do
|
40
|
+
not @expression.bulk?
|
41
|
+
end
|
42
|
+
end
|
27
43
|
end
|
28
44
|
end
|
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
|
+
version: 10.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
@@ -9,10 +9,10 @@ authors:
|
|
9
9
|
- daijiro
|
10
10
|
- Yuto HAYAMIZU
|
11
11
|
- SHIDARA Yoji
|
12
|
-
autorequire:
|
12
|
+
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2020-09-04 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: pkg-config
|
@@ -56,20 +56,6 @@ dependencies:
|
|
56
56
|
- - ">="
|
57
57
|
- !ruby/object:Gem::Version
|
58
58
|
version: '0'
|
59
|
-
- !ruby/object:Gem::Dependency
|
60
|
-
name: archive-zip
|
61
|
-
requirement: !ruby/object:Gem::Requirement
|
62
|
-
requirements:
|
63
|
-
- - ">="
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
version: '0'
|
66
|
-
type: :runtime
|
67
|
-
prerelease: false
|
68
|
-
version_requirements: !ruby/object:Gem::Requirement
|
69
|
-
requirements:
|
70
|
-
- - ">="
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
version: '0'
|
73
59
|
- !ruby/object:Gem::Dependency
|
74
60
|
name: test-unit
|
75
61
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,34 +84,6 @@ dependencies:
|
|
98
84
|
- - ">="
|
99
85
|
- !ruby/object:Gem::Version
|
100
86
|
version: '0'
|
101
|
-
- !ruby/object:Gem::Dependency
|
102
|
-
name: rake-compiler
|
103
|
-
requirement: !ruby/object:Gem::Requirement
|
104
|
-
requirements:
|
105
|
-
- - ">="
|
106
|
-
- !ruby/object:Gem::Version
|
107
|
-
version: 0.9.5
|
108
|
-
type: :development
|
109
|
-
prerelease: false
|
110
|
-
version_requirements: !ruby/object:Gem::Requirement
|
111
|
-
requirements:
|
112
|
-
- - ">="
|
113
|
-
- !ruby/object:Gem::Version
|
114
|
-
version: 0.9.5
|
115
|
-
- !ruby/object:Gem::Dependency
|
116
|
-
name: rake-compiler-dock
|
117
|
-
requirement: !ruby/object:Gem::Requirement
|
118
|
-
requirements:
|
119
|
-
- - ">="
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
version: 0.6.2
|
122
|
-
type: :development
|
123
|
-
prerelease: false
|
124
|
-
version_requirements: !ruby/object:Gem::Requirement
|
125
|
-
requirements:
|
126
|
-
- - ">="
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
version: 0.6.2
|
129
87
|
- !ruby/object:Gem::Dependency
|
130
88
|
name: bundler
|
131
89
|
requirement: !ruby/object:Gem::Requirement
|
@@ -196,8 +154,8 @@ email:
|
|
196
154
|
executables:
|
197
155
|
- grntest-log-analyze
|
198
156
|
- groonga-database-inspect
|
199
|
-
- groonga-index-dump
|
200
157
|
- grndump
|
158
|
+
- groonga-index-dump
|
201
159
|
extensions:
|
202
160
|
- ext/groonga/extconf.rb
|
203
161
|
extra_rdoc_files:
|
@@ -396,8 +354,9 @@ files:
|
|
396
354
|
homepage: http://ranguba.org/#about-rroonga
|
397
355
|
licenses:
|
398
356
|
- LGPL-2.1
|
399
|
-
metadata:
|
400
|
-
|
357
|
+
metadata:
|
358
|
+
msys2_mingw_dependencies: groonga>=10.0.1
|
359
|
+
post_install_message:
|
401
360
|
rdoc_options: []
|
402
361
|
require_paths:
|
403
362
|
- lib
|
@@ -413,79 +372,79 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
413
372
|
- !ruby/object:Gem::Version
|
414
373
|
version: '0'
|
415
374
|
requirements: []
|
416
|
-
rubygems_version: 3.
|
417
|
-
signing_key:
|
375
|
+
rubygems_version: 3.1.4
|
376
|
+
signing_key:
|
418
377
|
specification_version: 4
|
419
378
|
summary: Ruby bindings for Groonga that provide full text search and column store
|
420
379
|
features.
|
421
380
|
test_files:
|
422
|
-
- test/test-
|
423
|
-
- test/test-
|
424
|
-
- test/test-token-regexp.rb
|
381
|
+
- test/test-remote.rb
|
382
|
+
- test/test-table-arrow.rb
|
425
383
|
- test/test-encoding.rb
|
426
|
-
- test/test-
|
427
|
-
- test/test-
|
428
|
-
- test/test-
|
429
|
-
- test/test-lock-timeout.rb
|
430
|
-
- test/test-convert.rb
|
431
|
-
- test/test-memory-pool.rb
|
432
|
-
- test/test-index-column.rb
|
384
|
+
- test/test-column-cache.rb
|
385
|
+
- test/test-table-traverse.rb
|
386
|
+
- test/test-logger.rb
|
433
387
|
- test/test-exception.rb
|
434
|
-
- test/test-
|
388
|
+
- test/test-vector-column.rb
|
435
389
|
- test/run-test.rb
|
436
|
-
- test/test-
|
437
|
-
- test/test-
|
438
|
-
- test/test-
|
439
|
-
- test/test-remote.rb
|
440
|
-
- test/test-array.rb
|
441
|
-
- test/test-table-select-normalize.rb
|
442
|
-
- test/test-geo-point.rb
|
443
|
-
- test/test-logger.rb
|
444
|
-
- test/test-expression.rb
|
445
|
-
- test/test-procedure.rb
|
446
|
-
- test/test-fix-size-column.rb
|
447
|
-
- test/test-id.rb
|
390
|
+
- test/test-memory-pool.rb
|
391
|
+
- test/test-context.rb
|
392
|
+
- test/test-default-cache.rb
|
448
393
|
- test/test-windows-event-logger.rb
|
449
|
-
- test/test-schema-
|
450
|
-
- test/test-table-select-weight.rb
|
451
|
-
- test/test-accessor.rb
|
452
|
-
- test/test-type.rb
|
453
|
-
- test/test-hash.rb
|
454
|
-
- test/test-patricia-trie.rb
|
455
|
-
- test/test-query-logger.rb
|
456
|
-
- test/test-record.rb
|
457
|
-
- test/test-column.rb
|
458
|
-
- test/test-vector-column.rb
|
459
|
-
- test/test-variable.rb
|
394
|
+
- test/test-schema-create-table.rb
|
460
395
|
- test/test-table-group.rb
|
396
|
+
- test/test-database.rb
|
397
|
+
- test/test-hash.rb
|
398
|
+
- test/test-command-select.rb
|
461
399
|
- test/test-table-offset-and-limit.rb
|
462
|
-
- test/test-
|
463
|
-
- test/test-
|
464
|
-
- test/test-
|
400
|
+
- test/test-schema-type.rb
|
401
|
+
- test/test-sub-records.rb
|
402
|
+
- test/test-data-column.rb
|
403
|
+
- test/test-flushable.rb
|
404
|
+
- test/test-double-array-trie.rb
|
405
|
+
- test/groonga-test-utils.rb
|
465
406
|
- test/test-name.rb
|
466
|
-
- test/test-
|
467
|
-
- test/test-version.rb
|
468
|
-
- test/test-pagination.rb
|
407
|
+
- test/test-lock-timeout.rb
|
469
408
|
- test/test-database-inspector.rb
|
470
|
-
- test/test-
|
471
|
-
- test/test-gqtp.rb
|
472
|
-
- test/test-request-canceler.rb
|
473
|
-
- test/test-table-traverse.rb
|
474
|
-
- test/test-expression-builder.rb
|
475
|
-
- test/test-operator.rb
|
409
|
+
- test/test-expression.rb
|
476
410
|
- test/test-table-dumper.rb
|
477
|
-
- test/test-package-label.rb
|
478
411
|
- test/test-plugin.rb
|
479
|
-
- test/test-
|
412
|
+
- test/test-procedure.rb
|
413
|
+
- test/test-error-message.rb
|
414
|
+
- test/test-table-select-mecab.rb
|
415
|
+
- test/test-expression-builder.rb
|
416
|
+
- test/test-operator.rb
|
417
|
+
- test/test-query-logger.rb
|
418
|
+
- test/test-table-select-normalize.rb
|
419
|
+
- test/test-table-select.rb
|
480
420
|
- test/test-snippet.rb
|
481
|
-
- test/test-
|
482
|
-
- test/test-
|
483
|
-
- test/
|
484
|
-
- test/test-
|
485
|
-
- test/test-schema.rb
|
421
|
+
- test/test-variable-size-column.rb
|
422
|
+
- test/test-variable.rb
|
423
|
+
- test/test-id.rb
|
424
|
+
- test/test-patricia-trie.rb
|
486
425
|
- test/test-request-timer.rb
|
426
|
+
- test/test-pagination.rb
|
427
|
+
- test/test-request-canceler.rb
|
428
|
+
- test/test-thread.rb
|
429
|
+
- test/test-version.rb
|
430
|
+
- test/test-column.rb
|
431
|
+
- test/test-database-dumper.rb
|
432
|
+
- test/test-accessor.rb
|
487
433
|
- test/test-index-cursor.rb
|
488
|
-
- test/test-
|
434
|
+
- test/test-table.rb
|
435
|
+
- test/test-normalizer.rb
|
436
|
+
- test/test-table-select-weight.rb
|
437
|
+
- test/test-fix-size-column.rb
|
438
|
+
- test/test-convert.rb
|
439
|
+
- test/test-record.rb
|
440
|
+
- test/test-package-label.rb
|
441
|
+
- test/test-array.rb
|
442
|
+
- test/test-schema.rb
|
489
443
|
- test/test-config.rb
|
490
|
-
- test/test-
|
491
|
-
- test/test-table-
|
444
|
+
- test/test-index-column.rb
|
445
|
+
- test/test-table-key-support.rb
|
446
|
+
- test/test-schema-dumper.rb
|
447
|
+
- test/test-gqtp.rb
|
448
|
+
- test/test-token-regexp.rb
|
449
|
+
- test/test-type.rb
|
450
|
+
- test/test-geo-point.rb
|