rroonga 6.0.9 → 6.1.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.
- checksums.yaml +4 -4
- data/doc/text/news.md +8 -0
- data/ext/groonga/rb-grn-index-column.c +54 -0
- data/ext/groonga/rb-grn-object.c +4 -0
- data/ext/groonga/rb-grn-table.c +18 -0
- data/ext/groonga/rb-grn.h +2 -2
- data/lib/groonga/dumper.rb +8 -1
- data/lib/groonga/schema.rb +2 -1
- data/rroonga-build.rb +2 -2
- data/test/test-index-column.rb +124 -1
- data/test/test-schema-dumper.rb +82 -4
- metadata +59 -60
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78fd337dfaf2b617d681f0d50231e3aa53462cb9
|
4
|
+
data.tar.gz: a9d2c0a6d5f182494441b98ada3a83b9a69f8452
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de6363baa9a40f6cf01224c184ab73d04886307197dc84d1a8ac55e1db9b8cc1e4ed919931f2c24247b6a41406204e1a4afaebf17096d6dc234ab95f92aff9a1
|
7
|
+
data.tar.gz: a90742232b1c67a901f00fc9df9f2a230d261e5d0fdab445d9074fa6b3276bfe3d6da43badafc078cf0a0ab4149e1436b55fea231544a4e6fe6b5755b88976ab
|
data/doc/text/news.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# NEWS
|
2
2
|
|
3
|
+
## 6.1.0: 2016-11-07 {#version-6-1-0}
|
4
|
+
|
5
|
+
### Improvements
|
6
|
+
|
7
|
+
* {Groonga::Table#define_index_column}: Added `:size` option to
|
8
|
+
support small or medium size of index column. Specify `:small` or
|
9
|
+
`:medium` to customize it.
|
10
|
+
|
3
11
|
## 6.0.9: 2016-10-07 {#version-6-0-9}
|
4
12
|
|
5
13
|
### Improvements
|
@@ -883,6 +883,56 @@ rb_grn_index_column_with_position_p (VALUE self)
|
|
883
883
|
return CBOOL2RVAL(flags & GRN_OBJ_WITH_POSITION);
|
884
884
|
}
|
885
885
|
|
886
|
+
/*
|
887
|
+
* Checks whether the index column is small or not.
|
888
|
+
*
|
889
|
+
* @overload small?
|
890
|
+
* @return [Boolean] `true` if the index column is small,
|
891
|
+
* `false` otherwise.
|
892
|
+
*
|
893
|
+
* @since 6.1.0
|
894
|
+
*/
|
895
|
+
static VALUE
|
896
|
+
rb_grn_index_column_small_p (VALUE self)
|
897
|
+
{
|
898
|
+
grn_obj *column;
|
899
|
+
grn_ctx *context;
|
900
|
+
grn_column_flags flags;
|
901
|
+
|
902
|
+
rb_grn_index_column_deconstruct(SELF(self), &column, &context,
|
903
|
+
NULL, NULL,
|
904
|
+
NULL, NULL, NULL, NULL, NULL,
|
905
|
+
NULL, NULL);
|
906
|
+
|
907
|
+
flags = grn_column_get_flags(context, column);
|
908
|
+
return CBOOL2RVAL(flags & GRN_OBJ_INDEX_SMALL);
|
909
|
+
}
|
910
|
+
|
911
|
+
/*
|
912
|
+
* Checks whether the index column is medium or not.
|
913
|
+
*
|
914
|
+
* @overload medium?
|
915
|
+
* @return [Boolean] `true` if the index column is medium,
|
916
|
+
* `false` otherwise.
|
917
|
+
*
|
918
|
+
* @since 6.1.0
|
919
|
+
*/
|
920
|
+
static VALUE
|
921
|
+
rb_grn_index_column_medium_p (VALUE self)
|
922
|
+
{
|
923
|
+
grn_obj *column;
|
924
|
+
grn_ctx *context;
|
925
|
+
grn_column_flags flags;
|
926
|
+
|
927
|
+
rb_grn_index_column_deconstruct(SELF(self), &column, &context,
|
928
|
+
NULL, NULL,
|
929
|
+
NULL, NULL, NULL, NULL, NULL,
|
930
|
+
NULL, NULL);
|
931
|
+
|
932
|
+
flags = grn_column_get_flags(context, column);
|
933
|
+
return CBOOL2RVAL(flags & GRN_OBJ_INDEX_MEDIUM);
|
934
|
+
}
|
935
|
+
|
886
936
|
/*
|
887
937
|
* Opens cursor to iterate posting in the index column.
|
888
938
|
*
|
@@ -1310,6 +1360,10 @@ rb_grn_init_index_column (VALUE mGrn)
|
|
1310
1360
|
rb_grn_index_column_with_weight_p, 0);
|
1311
1361
|
rb_define_method(rb_cGrnIndexColumn, "with_position?",
|
1312
1362
|
rb_grn_index_column_with_position_p, 0);
|
1363
|
+
rb_define_method(rb_cGrnIndexColumn, "small?",
|
1364
|
+
rb_grn_index_column_small_p, 0);
|
1365
|
+
rb_define_method(rb_cGrnIndexColumn, "medium?",
|
1366
|
+
rb_grn_index_column_medium_p, 0);
|
1313
1367
|
|
1314
1368
|
rb_define_method(rb_cGrnIndexColumn, "open_cursor",
|
1315
1369
|
rb_grn_index_column_open_cursor, -1);
|
data/ext/groonga/rb-grn-object.c
CHANGED
@@ -927,6 +927,10 @@ rb_grn_object_inspect_content_flags_with_label (VALUE inspected,
|
|
927
927
|
rb_ary_push(inspected_flags, rb_str_new_cstr("WITH_WEIGHT"));
|
928
928
|
if (column_flags & GRN_OBJ_WITH_POSITION)
|
929
929
|
rb_ary_push(inspected_flags, rb_str_new_cstr("WITH_POSITION"));
|
930
|
+
if (column_flags & GRN_OBJ_INDEX_SMALL)
|
931
|
+
rb_ary_push(inspected_flags, rb_str_new_cstr("SMALL"));
|
932
|
+
if (column_flags & GRN_OBJ_INDEX_MEDIUM)
|
933
|
+
rb_ary_push(inspected_flags, rb_str_new_cstr("MEDIUM"));
|
930
934
|
break;
|
931
935
|
default:
|
932
936
|
break;
|
data/ext/groonga/rb-grn-table.c
CHANGED
@@ -357,6 +357,10 @@ rb_grn_table_define_column (int argc, VALUE *argv, VALUE self)
|
|
357
357
|
* 転置索引にweight情報を合わせて格納する。
|
358
358
|
* @option options :with_position
|
359
359
|
* 転置索引に出現位置情報を合わせて格納する。
|
360
|
+
* @option options :size (nil)
|
361
|
+
* The size of index column. It must be `nil`, `:small` or
|
362
|
+
* `:medium`. `nil` means full size. `:small` means small
|
363
|
+
* size. `:medium` means medium size.
|
360
364
|
* @option options :source
|
361
365
|
* インデックス対象となるカラムを指定する。 +:sources+ との併用はできない。
|
362
366
|
* @option options :sources
|
@@ -376,6 +380,7 @@ rb_grn_table_define_index_column (int argc, VALUE *argv, VALUE self)
|
|
376
380
|
VALUE rb_name, rb_value_type;
|
377
381
|
VALUE options, rb_path, rb_persistent;
|
378
382
|
VALUE rb_with_section, rb_with_weight, rb_with_position;
|
383
|
+
VALUE rb_size;
|
379
384
|
VALUE rb_column, rb_source, rb_sources;
|
380
385
|
VALUE columns;
|
381
386
|
|
@@ -395,6 +400,7 @@ rb_grn_table_define_index_column (int argc, VALUE *argv, VALUE self)
|
|
395
400
|
"with_section", &rb_with_section,
|
396
401
|
"with_weight", &rb_with_weight,
|
397
402
|
"with_position", &rb_with_position,
|
403
|
+
"size", &rb_size,
|
398
404
|
"source", &rb_source,
|
399
405
|
"sources", &rb_sources,
|
400
406
|
NULL);
|
@@ -443,6 +449,18 @@ rb_grn_table_define_index_column (int argc, VALUE *argv, VALUE self)
|
|
443
449
|
if (RVAL2CBOOL(rb_with_position))
|
444
450
|
flags |= GRN_OBJ_WITH_POSITION;
|
445
451
|
|
452
|
+
if (NIL_P(rb_size)) {
|
453
|
+
/* do nothing */
|
454
|
+
} else if (rb_grn_equal_option(rb_size, "small")) {
|
455
|
+
flags |= GRN_OBJ_INDEX_SMALL;
|
456
|
+
} else if (rb_grn_equal_option(rb_size, "medium")) {
|
457
|
+
flags |= GRN_OBJ_INDEX_MEDIUM;
|
458
|
+
} else {
|
459
|
+
rb_raise(rb_eArgError,
|
460
|
+
":size must be nil, :small or :medium: <%" PRIsVALUE ">",
|
461
|
+
rb_size);
|
462
|
+
}
|
463
|
+
|
446
464
|
if (!NIL_P(rb_source) && !NIL_P(rb_sources))
|
447
465
|
rb_raise(rb_eArgError, "should not pass both of :source and :sources.");
|
448
466
|
|
data/ext/groonga/rb-grn.h
CHANGED
@@ -98,8 +98,8 @@ RB_GRN_BEGIN_DECLS
|
|
98
98
|
#endif
|
99
99
|
|
100
100
|
#define RB_GRN_MAJOR_VERSION 6
|
101
|
-
#define RB_GRN_MINOR_VERSION
|
102
|
-
#define RB_GRN_MICRO_VERSION
|
101
|
+
#define RB_GRN_MINOR_VERSION 1
|
102
|
+
#define RB_GRN_MICRO_VERSION 0
|
103
103
|
|
104
104
|
#define RB_GRN_OBJECT(object) ((RbGrnObject *)(object))
|
105
105
|
#define RB_GRN_NAMED_OBJECT(object) ((RbGrnNamedObject *)(object))
|
data/lib/groonga/dumper.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
#
|
3
|
-
# Copyright (C) 2011-
|
3
|
+
# Copyright (C) 2011-2016 Kouhei Sutou <kou@clear-code.com>
|
4
4
|
# Copyright (C) 2014 Masafumi Yokoyama <myokoym@gmail.com>
|
5
5
|
#
|
6
6
|
# This library is free software; you can redistribute it and/or
|
@@ -487,6 +487,11 @@ module Groonga
|
|
487
487
|
options[:with_section] = true if column.with_section?
|
488
488
|
options[:with_weight] = true if column.with_weight?
|
489
489
|
options[:with_position] = true if column.with_position?
|
490
|
+
if column.small?
|
491
|
+
options[:size] = :small
|
492
|
+
elsif column.medium?
|
493
|
+
options[:size] = :medium
|
494
|
+
end
|
490
495
|
arguments = [
|
491
496
|
dump_object(target_table_name),
|
492
497
|
sources.size == 1 ? source_names : "[#{source_names}]",
|
@@ -643,6 +648,8 @@ module Groonga
|
|
643
648
|
flags << "WITH_SECTION" if column.with_section?
|
644
649
|
flags << "WITH_WEIGHT" if column.with_weight?
|
645
650
|
flags << "WITH_POSITION" if column.with_position?
|
651
|
+
flags << "INDEX_SMALL" if column.small?
|
652
|
+
flags << "INDEX_MEDIUM" if column.medium?
|
646
653
|
parameters << "#{flags.join('|')}"
|
647
654
|
parameters << "#{column.range.name}"
|
648
655
|
source_names = column.sources.collect do |source|
|
data/lib/groonga/schema.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
#
|
3
|
-
# Copyright (C) 2009-
|
3
|
+
# Copyright (C) 2009-2016 Kouhei Sutou <kou@clear-code.com>
|
4
4
|
# Copyright (C) 2014-2015 Masafumi Yokoyama <yokoyama@clear-code.com>
|
5
5
|
#
|
6
6
|
# This library is free software; you can redistribute it and/or
|
@@ -1697,6 +1697,7 @@ module Groonga
|
|
1697
1697
|
:with_section => @options[:with_section],
|
1698
1698
|
:with_weight => @options[:with_weight],
|
1699
1699
|
:with_position => @options[:with_position],
|
1700
|
+
:size => @options[:size],
|
1700
1701
|
}
|
1701
1702
|
end
|
1702
1703
|
|
data/rroonga-build.rb
CHANGED
data/test/test-index-column.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
#
|
3
|
-
# Copyright (C) 2009-
|
3
|
+
# Copyright (C) 2009-2016 Kouhei Sutou <kou@clear-code.com>
|
4
4
|
# Copyright (C) 2016 Masafumi Yokoyama <yokoyama@clear-code.com>
|
5
5
|
#
|
6
6
|
# This library is free software; you can redistribute it and/or
|
@@ -378,6 +378,67 @@ class IndexColumnTest < Test::Unit::TestCase
|
|
378
378
|
context["Tags.default"].with_position?,
|
379
379
|
])
|
380
380
|
end
|
381
|
+
|
382
|
+
class SizeTest < self
|
383
|
+
def test_small
|
384
|
+
Groonga::Schema.define do |schema|
|
385
|
+
schema.create_table("Tags",
|
386
|
+
:type => :patricia_trie,
|
387
|
+
:key_type => "ShortText") do |table|
|
388
|
+
table.index("Articles.tags",
|
389
|
+
:name => "small",
|
390
|
+
:size => :small)
|
391
|
+
table.index("Articles.tags",
|
392
|
+
:name => "default")
|
393
|
+
end
|
394
|
+
end
|
395
|
+
|
396
|
+
assert_equal([
|
397
|
+
true,
|
398
|
+
false,
|
399
|
+
],
|
400
|
+
[
|
401
|
+
context["Tags.small"].small?,
|
402
|
+
context["Tags.default"].small?,
|
403
|
+
])
|
404
|
+
end
|
405
|
+
|
406
|
+
def test_medium
|
407
|
+
Groonga::Schema.define do |schema|
|
408
|
+
schema.create_table("Tags",
|
409
|
+
:type => :patricia_trie,
|
410
|
+
:key_type => "ShortText") do |table|
|
411
|
+
table.index("Articles.tags",
|
412
|
+
:name => "medium",
|
413
|
+
:size => :medium)
|
414
|
+
table.index("Articles.tags",
|
415
|
+
:name => "default")
|
416
|
+
end
|
417
|
+
end
|
418
|
+
|
419
|
+
assert_equal([
|
420
|
+
true,
|
421
|
+
false,
|
422
|
+
],
|
423
|
+
[
|
424
|
+
context["Tags.medium"].medium?,
|
425
|
+
context["Tags.default"].medium?,
|
426
|
+
])
|
427
|
+
end
|
428
|
+
|
429
|
+
def test_invalid
|
430
|
+
Groonga::Schema.create_table("Tags",
|
431
|
+
:type => :patricia_trie,
|
432
|
+
:key_type => "ShortText")
|
433
|
+
message = ":size must be nil, :small or :medium: <invalid>"
|
434
|
+
assert_raise(ArgumentError.new(message)) do
|
435
|
+
tags = context["Tags"]
|
436
|
+
tags.define_index_column("small",
|
437
|
+
context["Articles"],
|
438
|
+
:size => "invalid")
|
439
|
+
end
|
440
|
+
end
|
441
|
+
end
|
381
442
|
end
|
382
443
|
|
383
444
|
class SourceTest < self
|
@@ -684,4 +745,66 @@ class IndexColumnTest < Test::Unit::TestCase
|
|
684
745
|
end
|
685
746
|
end
|
686
747
|
end
|
748
|
+
|
749
|
+
class InspectTest < self
|
750
|
+
def setup
|
751
|
+
super
|
752
|
+
setup_source
|
753
|
+
end
|
754
|
+
|
755
|
+
def setup_source
|
756
|
+
Groonga::Schema.define do |schema|
|
757
|
+
schema.create_table("Articles") do |article|
|
758
|
+
article.text(:content)
|
759
|
+
article.short_text(:tag)
|
760
|
+
end
|
761
|
+
end
|
762
|
+
end
|
763
|
+
|
764
|
+
def test_small_size
|
765
|
+
Groonga::Schema.define do |schema|
|
766
|
+
schema.create_table("Tags",
|
767
|
+
:type => :hash,
|
768
|
+
:key_type => "ShortText") do |tags|
|
769
|
+
tags.index("Articles.tag", :size => :small)
|
770
|
+
end
|
771
|
+
end
|
772
|
+
|
773
|
+
index = context["Tags.Articles_tag"]
|
774
|
+
source_column_names = index.sources.collect(&:local_name).join(",")
|
775
|
+
assert_equal("\#<Groonga::IndexColumn " +
|
776
|
+
"id: <#{index.id}>, " +
|
777
|
+
"name: <#{index.name}>, " +
|
778
|
+
"path: <#{index.path}>, " +
|
779
|
+
"domain: <#{index.domain.name}>, " +
|
780
|
+
"range: <#{index.range.name}>, " +
|
781
|
+
"flags: <SMALL>, " +
|
782
|
+
"sources: <#{source_column_names}>" +
|
783
|
+
">",
|
784
|
+
index.inspect)
|
785
|
+
end
|
786
|
+
|
787
|
+
def test_medium_size
|
788
|
+
Groonga::Schema.define do |schema|
|
789
|
+
schema.create_table("Tags",
|
790
|
+
:type => :hash,
|
791
|
+
:key_type => "ShortText") do |tags|
|
792
|
+
tags.index("Articles.tag", :size => :medium)
|
793
|
+
end
|
794
|
+
end
|
795
|
+
|
796
|
+
index = context["Tags.Articles_tag"]
|
797
|
+
source_column_names = index.sources.collect(&:local_name).join(",")
|
798
|
+
assert_equal("\#<Groonga::IndexColumn " +
|
799
|
+
"id: <#{index.id}>, " +
|
800
|
+
"name: <#{index.name}>, " +
|
801
|
+
"path: <#{index.path}>, " +
|
802
|
+
"domain: <#{index.domain.name}>, " +
|
803
|
+
"range: <#{index.range.name}>, " +
|
804
|
+
"flags: <MEDIUM>, " +
|
805
|
+
"sources: <#{source_column_names}>" +
|
806
|
+
">",
|
807
|
+
index.inspect)
|
808
|
+
end
|
809
|
+
end
|
687
810
|
end
|
data/test/test-schema-dumper.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2009-
|
1
|
+
# Copyright (C) 2009-2016 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
|
@@ -86,7 +86,7 @@ class SchemaDumperTest < Test::Unit::TestCase
|
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
-
def define_index_schema
|
89
|
+
def define_index_schema(options={})
|
90
90
|
context.register_plugin("token_filters/stop_word")
|
91
91
|
Groonga::Schema.define do |schema|
|
92
92
|
schema.create_table("Items",
|
@@ -101,8 +101,8 @@ class SchemaDumperTest < Test::Unit::TestCase
|
|
101
101
|
:default_tokenizer => "TokenBigram",
|
102
102
|
:token_filters => ["TokenFilterStopWord"],
|
103
103
|
:normalizer => "NormalizerAuto") do |table|
|
104
|
-
table.index("Items", "_key")
|
105
|
-
table.index("Items", "title")
|
104
|
+
table.index("Items", "_key", options[:key_index_options] || {})
|
105
|
+
table.index("Items", "title", options[:title_index_options] || {})
|
106
106
|
end
|
107
107
|
end
|
108
108
|
end
|
@@ -236,6 +236,58 @@ end
|
|
236
236
|
SCHEMA
|
237
237
|
end
|
238
238
|
|
239
|
+
def test_small_index
|
240
|
+
define_index_schema(:title_index_options => {:size => :small})
|
241
|
+
assert_equal(<<-SCHEMA, dump)
|
242
|
+
create_table("Items",
|
243
|
+
:type => :hash,
|
244
|
+
:key_type => "ShortText",
|
245
|
+
:force => true) do |table|
|
246
|
+
table.short_text("title")
|
247
|
+
end
|
248
|
+
|
249
|
+
create_table("Terms",
|
250
|
+
:type => :patricia_trie,
|
251
|
+
:key_type => "ShortText",
|
252
|
+
:default_tokenizer => "TokenBigram",
|
253
|
+
:token_filters => ["TokenFilterStopWord"],
|
254
|
+
:normalizer => "NormalizerAuto",
|
255
|
+
:force => true) do |table|
|
256
|
+
end
|
257
|
+
|
258
|
+
change_table("Terms") do |table|
|
259
|
+
table.index("Items", "_key", :name => "Items__key", :with_position => true)
|
260
|
+
table.index("Items", "title", :name => "Items_title", :with_position => true, :size => :small)
|
261
|
+
end
|
262
|
+
SCHEMA
|
263
|
+
end
|
264
|
+
|
265
|
+
def test_medium_index
|
266
|
+
define_index_schema(:title_index_options => {:size => :medium})
|
267
|
+
assert_equal(<<-SCHEMA, dump)
|
268
|
+
create_table("Items",
|
269
|
+
:type => :hash,
|
270
|
+
:key_type => "ShortText",
|
271
|
+
:force => true) do |table|
|
272
|
+
table.short_text("title")
|
273
|
+
end
|
274
|
+
|
275
|
+
create_table("Terms",
|
276
|
+
:type => :patricia_trie,
|
277
|
+
:key_type => "ShortText",
|
278
|
+
:default_tokenizer => "TokenBigram",
|
279
|
+
:token_filters => ["TokenFilterStopWord"],
|
280
|
+
:normalizer => "NormalizerAuto",
|
281
|
+
:force => true) do |table|
|
282
|
+
end
|
283
|
+
|
284
|
+
change_table("Terms") do |table|
|
285
|
+
table.index("Items", "_key", :name => "Items__key", :with_position => true)
|
286
|
+
table.index("Items", "title", :name => "Items_title", :with_position => true, :size => :medium)
|
287
|
+
end
|
288
|
+
SCHEMA
|
289
|
+
end
|
290
|
+
|
239
291
|
def test_weight_vector
|
240
292
|
define_weight_vector_schema
|
241
293
|
assert_equal(<<-SCHEMA, dump)
|
@@ -317,6 +369,32 @@ column_create Terms Items_title COLUMN_INDEX|WITH_POSITION Items title
|
|
317
369
|
SCHEMA
|
318
370
|
end
|
319
371
|
|
372
|
+
def test_small_index
|
373
|
+
define_index_schema(:title_index_options => {:size => :small})
|
374
|
+
assert_equal(<<-SCHEMA, dump)
|
375
|
+
table_create Items TABLE_HASH_KEY ShortText
|
376
|
+
column_create Items title COLUMN_SCALAR ShortText
|
377
|
+
|
378
|
+
table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --token_filters TokenFilterStopWord --normalizer NormalizerAuto
|
379
|
+
|
380
|
+
column_create Terms Items__key COLUMN_INDEX|WITH_POSITION Items _key
|
381
|
+
column_create Terms Items_title COLUMN_INDEX|WITH_POSITION|INDEX_SMALL Items title
|
382
|
+
SCHEMA
|
383
|
+
end
|
384
|
+
|
385
|
+
def test_medium_index
|
386
|
+
define_index_schema(:title_index_options => {:size => :medium})
|
387
|
+
assert_equal(<<-SCHEMA, dump)
|
388
|
+
table_create Items TABLE_HASH_KEY ShortText
|
389
|
+
column_create Items title COLUMN_SCALAR ShortText
|
390
|
+
|
391
|
+
table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --token_filters TokenFilterStopWord --normalizer NormalizerAuto
|
392
|
+
|
393
|
+
column_create Terms Items__key COLUMN_INDEX|WITH_POSITION Items _key
|
394
|
+
column_create Terms Items_title COLUMN_INDEX|WITH_POSITION|INDEX_MEDIUM Items title
|
395
|
+
SCHEMA
|
396
|
+
end
|
397
|
+
|
320
398
|
def test_weight_vector
|
321
399
|
define_weight_vector_schema
|
322
400
|
assert_equal(<<-SCHEMA, dump)
|
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: 6.0
|
4
|
+
version: 6.1.0
|
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: 2016-
|
15
|
+
date: 2016-11-07 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
|
-
- groonga-index-dump
|
198
197
|
- groonga-database-inspect
|
199
|
-
- grndump
|
200
198
|
- grntest-log-analyze
|
199
|
+
- grndump
|
200
|
+
- groonga-index-dump
|
201
201
|
extensions:
|
202
202
|
- ext/groonga/extconf.rb
|
203
203
|
extra_rdoc_files:
|
@@ -417,72 +417,71 @@ specification_version: 4
|
|
417
417
|
summary: Ruby bindings for Groonga that provide full text search and column store
|
418
418
|
features.
|
419
419
|
test_files:
|
420
|
-
- test/test-
|
421
|
-
- test/test-
|
422
|
-
- test/test-table-
|
423
|
-
- test/test-table-
|
424
|
-
- test/test-
|
425
|
-
- test/test-
|
426
|
-
- test/test-
|
427
|
-
- test/test-
|
428
|
-
- test/test-
|
429
|
-
- test/test-
|
430
|
-
- test/test-request-timer.rb
|
431
|
-
- test/test-table.rb
|
420
|
+
- test/test-statistic-measurer.rb
|
421
|
+
- test/test-table-select-weight.rb
|
422
|
+
- test/test-table-key-support.rb
|
423
|
+
- test/test-table-group.rb
|
424
|
+
- test/test-id.rb
|
425
|
+
- test/test-table-select-normalize.rb
|
426
|
+
- test/test-schema-type.rb
|
427
|
+
- test/test-record.rb
|
428
|
+
- test/test-table-traverse.rb
|
429
|
+
- test/test-data-column.rb
|
432
430
|
- test/test-lock-timeout.rb
|
433
|
-
- test/test-
|
434
|
-
- test/test-index-column.rb
|
435
|
-
- test/test-fix-size-column.rb
|
431
|
+
- test/test-variable.rb
|
436
432
|
- test/test-table-dumper.rb
|
437
|
-
- test/test-
|
438
|
-
- test/test-record.rb
|
439
|
-
- test/test-schema-dumper.rb
|
440
|
-
- test/test-variable-size-column.rb
|
441
|
-
- test/test-type.rb
|
442
|
-
- test/test-pagination.rb
|
443
|
-
- test/test-database-dumper.rb
|
444
|
-
- test/test-table-group.rb
|
445
|
-
- test/test-accessor.rb
|
446
|
-
- test/test-name.rb
|
447
|
-
- test/test-database.rb
|
433
|
+
- test/test-gqtp.rb
|
448
434
|
- test/test-database-inspector.rb
|
449
|
-
- test/test-
|
450
|
-
- test/test-
|
451
|
-
- test/test-
|
452
|
-
- test/test-
|
453
|
-
- test/test-
|
435
|
+
- test/test-flushable.rb
|
436
|
+
- test/test-context.rb
|
437
|
+
- test/test-index-column.rb
|
438
|
+
- test/test-exception.rb
|
439
|
+
- test/test-fix-size-column.rb
|
454
440
|
- test/test-config.rb
|
455
|
-
- test/test-
|
441
|
+
- test/test-sub-records.rb
|
456
442
|
- test/test-encoding.rb
|
457
|
-
- test/test-table-key-support.rb
|
458
|
-
- test/test-gqtp.rb
|
459
|
-
- test/run-test.rb
|
460
443
|
- test/test-patricia-trie.rb
|
461
|
-
- test/test
|
462
|
-
- test/test-table-select-weight.rb
|
444
|
+
- test/run-test.rb
|
463
445
|
- test/test-windows-event-logger.rb
|
464
|
-
- test/test-
|
446
|
+
- test/test-plugin.rb
|
447
|
+
- test/test-request-canceler.rb
|
448
|
+
- test/test-query-logger.rb
|
449
|
+
- test/test-schema-dumper.rb
|
450
|
+
- test/test-snippet.rb
|
451
|
+
- test/test-accessor.rb
|
452
|
+
- test/test-database.rb
|
453
|
+
- test/test-table-offset-and-limit.rb
|
454
|
+
- test/test-version.rb
|
455
|
+
- test/test-thread.rb
|
456
|
+
- test/test-token-regexp.rb
|
457
|
+
- test/test-table-select.rb
|
465
458
|
- test/test-logger.rb
|
466
459
|
- test/test-package-label.rb
|
467
|
-
- test/test-
|
468
|
-
- test/test-
|
469
|
-
- test/test-error-message.rb
|
460
|
+
- test/groonga-test-utils.rb
|
461
|
+
- test/test-expression-builder.rb
|
470
462
|
- test/test-normalizer.rb
|
471
|
-
- test/test-
|
472
|
-
- test/test-
|
473
|
-
- test/test-
|
474
|
-
- test/test-
|
475
|
-
- test/test-
|
476
|
-
- test/test-id.rb
|
477
|
-
- test/test-data-column.rb
|
478
|
-
- test/test-exception.rb
|
479
|
-
- test/test-table-select-mecab.rb
|
480
|
-
- test/test-table-select-normalize.rb
|
463
|
+
- test/test-expression.rb
|
464
|
+
- test/test-convert.rb
|
465
|
+
- test/test-index-cursor.rb
|
466
|
+
- test/test-command-select.rb
|
467
|
+
- test/test-vector-column.rb
|
481
468
|
- test/test-schema.rb
|
469
|
+
- test/test-remote.rb
|
470
|
+
- test/test-procedure.rb
|
471
|
+
- test/test-name.rb
|
472
|
+
- test/test-operator.rb
|
473
|
+
- test/test-table-select-mecab.rb
|
474
|
+
- test/test-schema-create-table.rb
|
475
|
+
- test/test-request-timer.rb
|
482
476
|
- test/test-geo-point.rb
|
483
|
-
- test/test-
|
484
|
-
- test/
|
477
|
+
- test/test-database-dumper.rb
|
478
|
+
- test/test-table.rb
|
485
479
|
- test/test-column.rb
|
486
|
-
- test/test-
|
487
|
-
- test/test-
|
488
|
-
|
480
|
+
- test/test-pagination.rb
|
481
|
+
- test/test-double-array-trie.rb
|
482
|
+
- test/test-memory-pool.rb
|
483
|
+
- test/test-type.rb
|
484
|
+
- test/test-array.rb
|
485
|
+
- test/test-variable-size-column.rb
|
486
|
+
- test/test-error-message.rb
|
487
|
+
- test/test-hash.rb
|