rroonga 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/NEWS.ja.rdoc +11 -0
- data/NEWS.rdoc +10 -0
- data/ext/groonga/rb-grn-expression.c +4 -0
- data/ext/groonga/rb-grn-table.c +22 -5
- data/ext/groonga/rb-grn.h +1 -1
- data/html/index.html +2 -2
- metadata +4 -4
data/NEWS.ja.rdoc
CHANGED
data/NEWS.rdoc
CHANGED
@@ -98,6 +98,8 @@ rb_grn_expression_initialize (int argc, VALUE *argv, VALUE self)
|
|
98
98
|
rb_grn_object_assign(Qnil, self, rb_context, context, expression);
|
99
99
|
rb_grn_context_check(context, self);
|
100
100
|
|
101
|
+
rb_iv_set(self, "@objects", rb_ary_new());
|
102
|
+
|
101
103
|
return Qnil;
|
102
104
|
}
|
103
105
|
|
@@ -183,6 +185,8 @@ rb_grn_expression_append_object (int argc, VALUE *argv, VALUE self)
|
|
183
185
|
grn_expr_append_obj(context, expression, object,
|
184
186
|
operation, n_arguments);
|
185
187
|
rb_grn_context_check(context, self);
|
188
|
+
rb_ary_push(rb_iv_get(self, "@objects"), rb_object);
|
189
|
+
|
186
190
|
return self;
|
187
191
|
}
|
188
192
|
|
data/ext/groonga/rb-grn-table.c
CHANGED
@@ -339,6 +339,27 @@ rb_grn_table_define_column (int argc, VALUE *argv, VALUE self)
|
|
339
339
|
return rb_column;
|
340
340
|
}
|
341
341
|
|
342
|
+
static grn_bool
|
343
|
+
n_gram_tokenizer_p(grn_ctx *context, grn_obj *tokenizer)
|
344
|
+
{
|
345
|
+
char tokenizer_name[GRN_TABLE_MAX_KEY_SIZE];
|
346
|
+
int name_size;
|
347
|
+
|
348
|
+
name_size = grn_obj_name(context, tokenizer,
|
349
|
+
tokenizer_name, sizeof(tokenizer_name) - 1);
|
350
|
+
if (name_size == 0)
|
351
|
+
return GRN_FALSE;
|
352
|
+
|
353
|
+
tokenizer_name[name_size] = '\0';
|
354
|
+
|
355
|
+
#define HAVE_PREFIX_P(prefix) \
|
356
|
+
(strncmp(tokenizer_name, prefix, strlen(prefix)) == 0)
|
357
|
+
return (HAVE_PREFIX_P("TokenUnigram") ||
|
358
|
+
HAVE_PREFIX_P("TokenBigram") ||
|
359
|
+
HAVE_PREFIX_P("TokenTrigram"));
|
360
|
+
#undef HAVE_PREFIX_P
|
361
|
+
}
|
362
|
+
|
342
363
|
/*
|
343
364
|
* call-seq:
|
344
365
|
* table.define_index_column(name, value_type, options={}) -> Groonga::IndexColumn
|
@@ -438,16 +459,12 @@ rb_grn_table_define_index_column (int argc, VALUE *argv, VALUE self)
|
|
438
459
|
if (NIL_P(rb_with_position) &&
|
439
460
|
(table->header.type == GRN_TABLE_HASH_KEY ||
|
440
461
|
table->header.type == GRN_TABLE_PAT_KEY)) {
|
441
|
-
grn_id tokenizer_id;
|
442
462
|
grn_obj *tokenizer;
|
443
463
|
|
444
464
|
tokenizer = grn_obj_get_info(context, table,
|
445
465
|
GRN_INFO_DEFAULT_TOKENIZER,
|
446
466
|
NULL);
|
447
|
-
|
448
|
-
if ((tokenizer_id == GRN_DB_UNIGRAM) ||
|
449
|
-
(tokenizer_id == GRN_DB_BIGRAM) ||
|
450
|
-
(tokenizer_id == GRN_DB_TRIGRAM)) {
|
467
|
+
if (tokenizer && n_gram_tokenizer_p(context, tokenizer)) {
|
451
468
|
rb_with_position = Qtrue;
|
452
469
|
}
|
453
470
|
}
|
data/ext/groonga/rb-grn.h
CHANGED
data/html/index.html
CHANGED
@@ -49,7 +49,7 @@
|
|
49
49
|
|
50
50
|
<h3>rroongaの最新リリース</h3>
|
51
51
|
<p>
|
52
|
-
2010-12-
|
52
|
+
2010-12-25にリリースされた1.0.8が最新です。
|
53
53
|
</p>
|
54
54
|
|
55
55
|
<h3 id="install-rroonga">rroongaのインストール</h3>
|
@@ -85,7 +85,7 @@
|
|
85
85
|
|
86
86
|
<h3>ActiveGroongaの最新リリース</h3>
|
87
87
|
<p>
|
88
|
-
2010-
|
88
|
+
2010-12-25にリリースされた1.0.3が最新です。
|
89
89
|
</p>
|
90
90
|
|
91
91
|
<h3 id="install-active-groonga">ActiveGroongaのインストール</h3>
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rroonga
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 8
|
10
|
+
version: 1.0.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kouhei Sutou
|
@@ -19,7 +19,7 @@ autorequire:
|
|
19
19
|
bindir: bin
|
20
20
|
cert_chain: []
|
21
21
|
|
22
|
-
date: 2010-12-
|
22
|
+
date: 2010-12-25 00:00:00 +09:00
|
23
23
|
default_executable:
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|