ferret 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/Makefile +2 -2
- data/ext/ferret.c +27 -2
- data/ext/ferret.h +59 -16
- data/ext/ferret_ext.so +0 -0
- data/ext/index_io.c +72 -77
- data/ext/priority_queue.c +150 -145
- data/ext/ram_directory.c +47 -42
- data/ext/segment_merge_queue.c +4 -8
- data/ext/segment_term_enum.c +324 -0
- data/ext/similarity.c +59 -0
- data/ext/string_helper.c +2 -2
- data/ext/tags +150 -46
- data/ext/term.c +107 -152
- data/ext/term_buffer.c +105 -174
- data/ext/term_infos_reader.c +54 -0
- data/ext/terminfo.c +160 -0
- data/ext/token.c +93 -0
- data/lib/ferret.rb +1 -1
- data/lib/ferret/analysis/analyzers.rb +18 -0
- data/lib/ferret/analysis/standard_tokenizer.rb +19 -14
- data/lib/ferret/analysis/token.rb +8 -1
- data/lib/ferret/analysis/tokenizers.rb +10 -5
- data/lib/ferret/document/field.rb +33 -11
- data/lib/ferret/index/document_writer.rb +3 -2
- data/lib/ferret/index/field_infos.rb +38 -12
- data/lib/ferret/index/fields_io.rb +10 -4
- data/lib/ferret/index/index.rb +20 -4
- data/lib/ferret/index/index_reader.rb +19 -4
- data/lib/ferret/index/index_writer.rb +1 -1
- data/lib/ferret/index/multi_reader.rb +21 -7
- data/lib/ferret/index/segment_merge_info.rb +24 -22
- data/lib/ferret/index/segment_merge_queue.rb +2 -2
- data/lib/ferret/index/segment_merger.rb +28 -11
- data/lib/ferret/index/segment_reader.rb +19 -4
- data/lib/ferret/index/segment_term_enum.rb +3 -11
- data/lib/ferret/index/term_buffer.rb +13 -16
- data/lib/ferret/index/term_doc_enum.rb +8 -5
- data/lib/ferret/index/term_enum.rb +2 -2
- data/lib/ferret/index/term_info.rb +1 -5
- data/lib/ferret/index/term_infos_io.rb +2 -0
- data/lib/ferret/query_parser/query_parser.tab.rb +7 -7
- data/lib/ferret/search/phrase_scorer.rb +0 -1
- data/lib/ferret/search/similarity.rb +2 -2
- data/lib/ferret/search/term_scorer.rb +2 -2
- data/lib/ferret/store/directory.rb +2 -0
- data/lib/ferret/store/fs_store.rb +16 -3
- data/lib/ferret/store/ram_store.rb +2 -2
- data/test/unit/document/tc_field.rb +9 -0
- data/test/unit/index/tc_field_infos.rb +29 -21
- data/test/unit/index/tc_index.rb +44 -7
- data/test/unit/index/tc_term_buffer.rb +3 -3
- data/test/unit/index/tc_term_info.rb +1 -1
- data/test/unit/query_parser/tc_query_parser.rb +1 -1
- data/test/unit/search/tc_index_searcher.rb +3 -0
- data/test/unit/store/tc_fs_store.rb +47 -16
- data/test/unit/store/tc_ram_store.rb +1 -1
- metadata +8 -3
data/ext/segment_merge_queue.c
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
#include "ferret.h"
|
2
2
|
|
3
|
-
ID eq, lt;
|
4
3
|
/****************************************************************************
|
5
4
|
*
|
6
5
|
* SegmentMergeQueue Methods
|
@@ -11,7 +10,8 @@ static VALUE
|
|
11
10
|
frt_smq_less_than(VALUE self, VALUE rsti1, VALUE rsti2)
|
12
11
|
{
|
13
12
|
int base1, base2;
|
14
|
-
int cmp = frt_term_compare_to_int(rb_iv_get(rsti1, "@
|
13
|
+
int cmp = frt_term_compare_to_int(rb_iv_get(rsti1, "@term_buffer"),
|
14
|
+
rb_iv_get(rsti2, "@term_buffer"));
|
15
15
|
if (cmp == 0) {
|
16
16
|
base1 = FIX2INT(rb_iv_get(rsti1, "@base"));
|
17
17
|
base2 = FIX2INT(rb_iv_get(rsti2, "@base"));
|
@@ -30,12 +30,8 @@ frt_smq_less_than(VALUE self, VALUE rsti1, VALUE rsti2)
|
|
30
30
|
void
|
31
31
|
Init_segment_merge_queue(void)
|
32
32
|
{
|
33
|
-
/* IDs */
|
34
|
-
eq = rb_intern("==");
|
35
|
-
lt = rb_intern("<");
|
36
|
-
|
37
33
|
/* SegmentMergeQueue */
|
38
|
-
|
34
|
+
cSegmentMergeQueue = rb_define_class_under(mIndex, "SegmentMergeQueue", cPriorityQueue);
|
39
35
|
|
40
|
-
|
36
|
+
rb_define_method(cSegmentMergeQueue, "less_than", frt_smq_less_than, 2);
|
41
37
|
}
|
@@ -0,0 +1,324 @@
|
|
1
|
+
#include "ferret.h"
|
2
|
+
|
3
|
+
/****************************************************************************
|
4
|
+
*
|
5
|
+
* SegmentTermEnum Methods
|
6
|
+
*
|
7
|
+
****************************************************************************/
|
8
|
+
void
|
9
|
+
frt_ste_free(void *p)
|
10
|
+
{
|
11
|
+
SegmentTermEnum *ste = (SegmentTermEnum *)p;
|
12
|
+
free(ste->ti);
|
13
|
+
free(p);
|
14
|
+
}
|
15
|
+
void
|
16
|
+
frt_ste_mark(void *p)
|
17
|
+
{
|
18
|
+
SegmentTermEnum *ste = (SegmentTermEnum *)p;
|
19
|
+
rb_gc_mark(ste->input);
|
20
|
+
rb_gc_mark(ste->field_infos);
|
21
|
+
rb_gc_mark(ste->rtb_curr);
|
22
|
+
rb_gc_mark(ste->rtb_prev);
|
23
|
+
}
|
24
|
+
|
25
|
+
static VALUE
|
26
|
+
frt_ste_alloc(VALUE klass)
|
27
|
+
{
|
28
|
+
SegmentTermEnum *ste = ALLOC(SegmentTermEnum);
|
29
|
+
MEMZERO(ste, SegmentTermEnum, 1);
|
30
|
+
return Data_Wrap_Struct(klass, frt_ste_mark, frt_ste_free, ste);
|
31
|
+
}
|
32
|
+
|
33
|
+
#define GET_STE SegmentTermEnum *ste; Data_Get_Struct(self, SegmentTermEnum, ste)
|
34
|
+
static VALUE
|
35
|
+
frt_ste_init(VALUE self, VALUE input, VALUE field_infos, VALUE is_index)
|
36
|
+
{
|
37
|
+
int first_int;
|
38
|
+
GET_STE;
|
39
|
+
ste->is_index = RTEST(is_index);
|
40
|
+
ste->input = input;
|
41
|
+
Data_Get_Struct(input, IndexBuffer, ste->buf);
|
42
|
+
ste->field_infos = field_infos;
|
43
|
+
ste->position = -1;
|
44
|
+
ste->rtb_curr = rb_class_new_instance(0, NULL, cTermBuffer);
|
45
|
+
Data_Get_Struct(ste->rtb_curr, Term, ste->tb_curr);
|
46
|
+
ste->rtb_prev = rb_class_new_instance(0, NULL, cTermBuffer);
|
47
|
+
Data_Get_Struct(ste->rtb_prev, Term, ste->tb_prev);
|
48
|
+
ste->ti = ALLOC(TermInfo);
|
49
|
+
MEMZERO(ste->ti, TermInfo, 1);
|
50
|
+
ste->index_pointer = 0;
|
51
|
+
|
52
|
+
first_int = FIX2INT(frt_indexin_read_int(input));
|
53
|
+
|
54
|
+
if (first_int >= 0) {
|
55
|
+
// original-format file, without explicit format version number
|
56
|
+
ste->format = 0;
|
57
|
+
ste->size = first_int;
|
58
|
+
|
59
|
+
// back-compatible settings
|
60
|
+
ste->index_interval = 128;
|
61
|
+
ste->skip_interval = 0x7FFFFFFF; // switch off skip_to optimization
|
62
|
+
|
63
|
+
} else {
|
64
|
+
// we have a format version number
|
65
|
+
ste->format = first_int;
|
66
|
+
ste->size = FIX2INT(frt_indexin_read_long(input)); // read the size
|
67
|
+
|
68
|
+
if (ste->format == -1) {
|
69
|
+
if (!ste->is_index) {
|
70
|
+
ste->index_interval = FIX2INT(frt_indexin_read_int(input));
|
71
|
+
ste->format_m1skip_interval = FIX2INT(frt_indexin_read_int(input));
|
72
|
+
}
|
73
|
+
// switch off skip_to optimization for file format prior to
|
74
|
+
// 1.4rc2 in order to avoid a bug in skip_to implementation
|
75
|
+
// of these versions
|
76
|
+
ste->skip_interval = 0x7FFFFFFF;
|
77
|
+
} else {
|
78
|
+
ste->index_interval = FIX2INT(frt_indexin_read_int(input));
|
79
|
+
ste->skip_interval = FIX2INT(frt_indexin_read_int(input));
|
80
|
+
}
|
81
|
+
}
|
82
|
+
return self;
|
83
|
+
}
|
84
|
+
|
85
|
+
static VALUE
|
86
|
+
frt_ste_init_copy(VALUE self, VALUE rother)
|
87
|
+
{
|
88
|
+
SegmentTermEnum *other;
|
89
|
+
GET_STE;
|
90
|
+
Data_Get_Struct(rother, SegmentTermEnum, other);
|
91
|
+
MEMCPY(ste, other, SegmentTermEnum, 1);
|
92
|
+
ste->rtb_curr = rb_obj_clone(other->rtb_curr);
|
93
|
+
Data_Get_Struct(ste->rtb_curr, Term, ste->tb_curr);
|
94
|
+
ste->rtb_prev = rb_obj_clone(other->rtb_prev);
|
95
|
+
Data_Get_Struct(ste->rtb_prev, Term, ste->tb_prev);
|
96
|
+
ste->input = rb_obj_clone(other->input);
|
97
|
+
Data_Get_Struct(ste->input, IndexBuffer, ste->buf);
|
98
|
+
ste->ti = ALLOC(TermInfo);
|
99
|
+
MEMCPY(ste->ti, other->ti, TermInfo, 1);
|
100
|
+
return self;
|
101
|
+
}
|
102
|
+
|
103
|
+
static VALUE
|
104
|
+
frt_ste_seek(VALUE self, VALUE pointer, VALUE position, VALUE term, VALUE term_info)
|
105
|
+
{
|
106
|
+
TermInfo *ti;
|
107
|
+
GET_STE;
|
108
|
+
|
109
|
+
frt_indexin_seek(ste->input, pointer);
|
110
|
+
|
111
|
+
ste->position = FIX2INT(position);
|
112
|
+
frt_termbuffer_init_copy(ste->rtb_curr, term);
|
113
|
+
free(ste->tb_prev->text);
|
114
|
+
MEMZERO(ste->tb_prev, Term, 1);
|
115
|
+
ste->tb_prev->field = Qnil;
|
116
|
+
|
117
|
+
Data_Get_Struct(term_info, TermInfo, ti);
|
118
|
+
MEMCPY(ste->ti, ti, TermInfo, 1);
|
119
|
+
return Qnil;
|
120
|
+
}
|
121
|
+
|
122
|
+
static VALUE
|
123
|
+
frt_ste_next(VALUE self)
|
124
|
+
{
|
125
|
+
IndexBuffer *zzbuf;
|
126
|
+
TermInfo *ti;
|
127
|
+
GET_STE;
|
128
|
+
ste->position++;
|
129
|
+
|
130
|
+
Data_Get_Struct(ste->input, IndexBuffer, zzbuf);
|
131
|
+
|
132
|
+
if (ste->position >= ste->size) {
|
133
|
+
free(ste->tb_curr->text);
|
134
|
+
MEMZERO(ste->tb_curr, Term, 1);
|
135
|
+
ste->tb_curr->field = Qnil;
|
136
|
+
return Qnil;
|
137
|
+
}
|
138
|
+
|
139
|
+
frt_termbuffer_init_copy(ste->rtb_prev, ste->rtb_curr);
|
140
|
+
frt_termbuffer_read(ste->rtb_curr, ste->input, ste->field_infos);
|
141
|
+
|
142
|
+
ti = ste->ti;
|
143
|
+
ti->doc_freq = frt_read_vint(ste->input, zzbuf); // read doc freq
|
144
|
+
ti->freq_pointer += frt_read_vint(ste->input, zzbuf); // read freq pointer
|
145
|
+
ti->prox_pointer += frt_read_vint(ste->input, zzbuf); // read prox pointer
|
146
|
+
|
147
|
+
|
148
|
+
if (ste->format == -1) {
|
149
|
+
// just read skip_offset in order to increment file pointer
|
150
|
+
// value is never used since skip_to is switched off
|
151
|
+
if (!ste->is_index) {
|
152
|
+
if (ti->doc_freq > ste->format_m1skip_interval)
|
153
|
+
ti->skip_offset = frt_read_vint(ste->input, zzbuf);
|
154
|
+
}
|
155
|
+
} else {
|
156
|
+
if (ti->doc_freq >= ste->skip_interval)
|
157
|
+
ti->skip_offset = frt_read_vint(ste->input, zzbuf);
|
158
|
+
}
|
159
|
+
|
160
|
+
if (ste->is_index) {
|
161
|
+
ste->index_pointer += frt_read_vint(ste->input, zzbuf); // read index pointer
|
162
|
+
}
|
163
|
+
|
164
|
+
return Qtrue;
|
165
|
+
}
|
166
|
+
|
167
|
+
static VALUE
|
168
|
+
frt_ste_scan_to(VALUE self, VALUE rterm)
|
169
|
+
{
|
170
|
+
Term *term;
|
171
|
+
GET_STE;
|
172
|
+
Data_Get_Struct(rterm, Term, term);
|
173
|
+
while (frt_term_cmp(term, ste->tb_curr) > 0 && frt_ste_next(self) == Qtrue)
|
174
|
+
;
|
175
|
+
return Qnil;
|
176
|
+
}
|
177
|
+
|
178
|
+
static VALUE
|
179
|
+
frt_ste_get_term(VALUE self)
|
180
|
+
{
|
181
|
+
GET_STE;
|
182
|
+
return frt_termbuffer_to_term(ste->rtb_curr);
|
183
|
+
}
|
184
|
+
|
185
|
+
static VALUE
|
186
|
+
frt_ste_get_term_buffer(VALUE self)
|
187
|
+
{
|
188
|
+
GET_STE;
|
189
|
+
return ste->rtb_curr;
|
190
|
+
}
|
191
|
+
|
192
|
+
static VALUE
|
193
|
+
frt_ste_get_prev(VALUE self)
|
194
|
+
{
|
195
|
+
GET_STE;
|
196
|
+
return frt_termbuffer_to_term(ste->rtb_prev);
|
197
|
+
}
|
198
|
+
|
199
|
+
static VALUE
|
200
|
+
frt_ste_get_term_info(VALUE self)
|
201
|
+
{
|
202
|
+
VALUE rti;
|
203
|
+
TermInfo *ti;
|
204
|
+
GET_STE;
|
205
|
+
rti = rb_obj_alloc(cTermInfo);
|
206
|
+
Data_Get_Struct(rti, TermInfo, ti);
|
207
|
+
MEMCPY(ti, ste->ti, TermInfo, 1);
|
208
|
+
return rti;
|
209
|
+
}
|
210
|
+
|
211
|
+
static VALUE
|
212
|
+
frt_ste_set_term_info(VALUE self, VALUE rti)
|
213
|
+
{
|
214
|
+
TermInfo *ti;
|
215
|
+
GET_STE;
|
216
|
+
Data_Get_Struct(rti, TermInfo, ti);
|
217
|
+
MEMCPY(ste->ti, ti, TermInfo, 1);
|
218
|
+
return Qnil;
|
219
|
+
}
|
220
|
+
|
221
|
+
static VALUE
|
222
|
+
frt_ste_get_doc_freq(VALUE self)
|
223
|
+
{
|
224
|
+
GET_STE;
|
225
|
+
return INT2FIX(ste->ti->doc_freq);
|
226
|
+
}
|
227
|
+
|
228
|
+
static VALUE
|
229
|
+
frt_ste_get_freq_pointer(VALUE self)
|
230
|
+
{
|
231
|
+
GET_STE;
|
232
|
+
return INT2FIX(ste->ti->freq_pointer);
|
233
|
+
}
|
234
|
+
|
235
|
+
static VALUE
|
236
|
+
frt_ste_get_prox_pointer(VALUE self)
|
237
|
+
{
|
238
|
+
GET_STE;
|
239
|
+
return INT2FIX(ste->ti->prox_pointer);
|
240
|
+
}
|
241
|
+
|
242
|
+
static VALUE
|
243
|
+
frt_ste_close(VALUE self)
|
244
|
+
{
|
245
|
+
GET_STE;
|
246
|
+
return rb_funcall(ste->input, id_close, 0);
|
247
|
+
}
|
248
|
+
|
249
|
+
static VALUE
|
250
|
+
frt_ste_get_field_infos(VALUE self)
|
251
|
+
{
|
252
|
+
GET_STE;
|
253
|
+
return ste->field_infos;
|
254
|
+
}
|
255
|
+
|
256
|
+
static VALUE
|
257
|
+
frt_ste_get_size(VALUE self)
|
258
|
+
{
|
259
|
+
GET_STE;
|
260
|
+
return INT2FIX(ste->size);
|
261
|
+
}
|
262
|
+
|
263
|
+
static VALUE
|
264
|
+
frt_ste_get_position(VALUE self)
|
265
|
+
{
|
266
|
+
GET_STE;
|
267
|
+
return INT2FIX(ste->position);
|
268
|
+
}
|
269
|
+
|
270
|
+
static VALUE
|
271
|
+
frt_ste_get_index_pointer(VALUE self)
|
272
|
+
{
|
273
|
+
GET_STE;
|
274
|
+
return INT2FIX(ste->index_pointer);
|
275
|
+
}
|
276
|
+
|
277
|
+
static VALUE
|
278
|
+
frt_ste_get_index_interval(VALUE self)
|
279
|
+
{
|
280
|
+
GET_STE;
|
281
|
+
return INT2FIX(ste->index_interval);
|
282
|
+
}
|
283
|
+
|
284
|
+
static VALUE
|
285
|
+
frt_ste_get_skip_interval(VALUE self)
|
286
|
+
{
|
287
|
+
GET_STE;
|
288
|
+
return INT2FIX(ste->skip_interval);
|
289
|
+
}
|
290
|
+
|
291
|
+
/****************************************************************************
|
292
|
+
*
|
293
|
+
* Init Function
|
294
|
+
*
|
295
|
+
****************************************************************************/
|
296
|
+
|
297
|
+
void
|
298
|
+
Init_segment_term_enum(void)
|
299
|
+
{
|
300
|
+
/* SegmentTermEnum */
|
301
|
+
cSegmentTermEnum = rb_define_class_under(mIndex, "SegmentTermEnum", cTermEnum);
|
302
|
+
rb_define_alloc_func(cSegmentTermEnum, frt_ste_alloc);
|
303
|
+
|
304
|
+
rb_define_method(cSegmentTermEnum, "initialize", frt_ste_init, 3);
|
305
|
+
rb_define_method(cSegmentTermEnum, "initialize_copy", frt_ste_init_copy, 1);
|
306
|
+
rb_define_method(cSegmentTermEnum, "next?", frt_ste_next, 0);
|
307
|
+
rb_define_method(cSegmentTermEnum, "seek", frt_ste_seek, 4);
|
308
|
+
rb_define_method(cSegmentTermEnum, "scan_to", frt_ste_scan_to, 1);
|
309
|
+
rb_define_method(cSegmentTermEnum, "term", frt_ste_get_term, 0);
|
310
|
+
rb_define_method(cSegmentTermEnum, "term_buffer", frt_ste_get_term_buffer, 0);
|
311
|
+
rb_define_method(cSegmentTermEnum, "prev", frt_ste_get_prev, 0);
|
312
|
+
rb_define_method(cSegmentTermEnum, "term_info", frt_ste_get_term_info, 0);
|
313
|
+
rb_define_method(cSegmentTermEnum, "term_info=", frt_ste_set_term_info, 1);
|
314
|
+
rb_define_method(cSegmentTermEnum, "doc_freq", frt_ste_get_doc_freq, 0);
|
315
|
+
rb_define_method(cSegmentTermEnum, "freq_pointer", frt_ste_get_freq_pointer, 0);
|
316
|
+
rb_define_method(cSegmentTermEnum, "prox_pointer", frt_ste_get_prox_pointer, 0);
|
317
|
+
rb_define_method(cSegmentTermEnum, "close", frt_ste_close, 0);
|
318
|
+
rb_define_method(cSegmentTermEnum, "field_infos", frt_ste_get_field_infos, 0);
|
319
|
+
rb_define_method(cSegmentTermEnum, "size", frt_ste_get_size, 0);
|
320
|
+
rb_define_method(cSegmentTermEnum, "position", frt_ste_get_position, 0);
|
321
|
+
rb_define_method(cSegmentTermEnum, "index_pointer", frt_ste_get_index_pointer, 0);
|
322
|
+
rb_define_method(cSegmentTermEnum, "index_interval", frt_ste_get_index_interval, 0);
|
323
|
+
rb_define_method(cSegmentTermEnum, "skip_interval", frt_ste_get_skip_interval, 0);
|
324
|
+
}
|
data/ext/similarity.c
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
#include "ferret.h"
|
2
|
+
#include <math.h>
|
3
|
+
|
4
|
+
/****************************************************************************
|
5
|
+
*
|
6
|
+
* Similarity Methods
|
7
|
+
*
|
8
|
+
****************************************************************************/
|
9
|
+
|
10
|
+
/*
|
11
|
+
static VALUE
|
12
|
+
frt_sim_c_byte_to_float(VALUE self, VALUE rbyte)
|
13
|
+
{
|
14
|
+
int b = FIX2INT(rbyte);
|
15
|
+
if (b == 0)
|
16
|
+
return rb_float_new(0.0);
|
17
|
+
int mantissa = b & 0x07; // 0x07 = 7 = 0b00000111
|
18
|
+
int exponent = (b >> 3) & 0x1F; // 0x1f = 31 = 0b00011111
|
19
|
+
int val = (mantissa << 21) | ((exponent + 48) << 24);
|
20
|
+
void *tmp = &val;
|
21
|
+
return rb_float_new(*(float *)tmp);
|
22
|
+
}
|
23
|
+
*/
|
24
|
+
|
25
|
+
static VALUE
|
26
|
+
frt_dsim_tf(VALUE self, VALUE freq)
|
27
|
+
{
|
28
|
+
return rb_float_new(sqrt(NUM2DBL(freq)));
|
29
|
+
}
|
30
|
+
|
31
|
+
static VALUE
|
32
|
+
frt_dsim_idf(VALUE self, VALUE rdoc_freq, VALUE rnum_docs)
|
33
|
+
{
|
34
|
+
int doc_freq;
|
35
|
+
int num_docs = FIX2INT(rnum_docs);
|
36
|
+
if (num_docs == 0) return rb_float_new(0.0);
|
37
|
+
|
38
|
+
doc_freq = FIX2INT(rdoc_freq);
|
39
|
+
return rb_float_new(log((double)num_docs/(double)(doc_freq+1)) + 1.0);
|
40
|
+
}
|
41
|
+
|
42
|
+
/****************************************************************************
|
43
|
+
*
|
44
|
+
* Init Function
|
45
|
+
*
|
46
|
+
****************************************************************************/
|
47
|
+
|
48
|
+
void
|
49
|
+
Init_similarity(void)
|
50
|
+
{
|
51
|
+
VALUE cDefaultSimilarity;
|
52
|
+
/* Similarity */
|
53
|
+
cSimilarity = rb_define_class_under(mSearch, "Similarity", rb_cObject);
|
54
|
+
cDefaultSimilarity = rb_define_class_under(mSearch, "DefaultSimilarity", cSimilarity);
|
55
|
+
|
56
|
+
//rb_define_singleton_method(cSimilarity, "byte_to_float", frt_sim_c_byte_to_float, 1);
|
57
|
+
rb_define_method(cDefaultSimilarity, "tf", frt_dsim_tf, 1);
|
58
|
+
rb_define_method(cDefaultSimilarity, "idf", frt_dsim_idf, 2);
|
59
|
+
}
|
data/ext/string_helper.c
CHANGED
@@ -35,8 +35,8 @@ frt_sh_string_difference(VALUE self, VALUE rstr1, VALUE rstr2)
|
|
35
35
|
void
|
36
36
|
Init_string_helper(void)
|
37
37
|
{
|
38
|
-
|
38
|
+
/* StringHelper */
|
39
39
|
mStringHelper = rb_define_module_under(mUtils, "StringHelper");
|
40
40
|
|
41
|
-
|
41
|
+
rb_define_method(mStringHelper, "string_difference", frt_sh_string_difference, 2);
|
42
42
|
}
|
data/ext/tags
CHANGED
@@ -19,19 +19,29 @@ DISTCLEANFILES Makefile /^DISTCLEANFILES = $/;" m
|
|
19
19
|
DLDFLAGS Makefile /^DLDFLAGS = $/;" m
|
20
20
|
DLLIB Makefile /^DLLIB = $(TARGET).so$/;" m
|
21
21
|
EXEEXT Makefile /^EXEEXT = $/;" m
|
22
|
+
GET_MY_BUF index_io.c 31;" d file:
|
23
|
+
GET_STE segment_term_enum.c 33;" d file:
|
24
|
+
GET_TB term_buffer.c 43;" d file:
|
25
|
+
GET_TERM term.c 34;" d file:
|
26
|
+
GET_TI terminfo.c 24;" d file:
|
22
27
|
INSTALL Makefile /^INSTALL = \/usr\/bin\/install -c$/;" m
|
23
28
|
INSTALL_DATA Makefile /^INSTALL_DATA = $(INSTALL) -m 644$/;" m
|
24
29
|
INSTALL_PROG Makefile /^INSTALL_PROG = $(INSTALL) -m 0755$/;" m
|
25
30
|
IndexBuffer ferret.h /^typedef struct IndexBuffer {$/;" s
|
26
31
|
IndexBuffer ferret.h /^} IndexBuffer;$/;" t
|
27
|
-
|
32
|
+
Init_ferret_ext ferret.c /^Init_ferret_ext(void)$/;" f
|
28
33
|
Init_indexio index_io.c /^Init_indexio(void)$/;" f
|
29
34
|
Init_priority_queue priority_queue.c /^Init_priority_queue(void)$/;" f
|
30
35
|
Init_ram_directory ram_directory.c /^Init_ram_directory(void)$/;" f
|
31
36
|
Init_segment_merge_queue segment_merge_queue.c /^Init_segment_merge_queue(void)$/;" f
|
37
|
+
Init_segment_term_enum segment_term_enum.c /^Init_segment_term_enum(void)$/;" f
|
38
|
+
Init_similarity similarity.c /^Init_similarity(void)$/;" f
|
32
39
|
Init_string_helper string_helper.c /^Init_string_helper(void)$/;" f
|
33
40
|
Init_term term.c /^Init_term(void)$/;" f
|
34
41
|
Init_term_buffer term_buffer.c /^Init_term_buffer(void) {$/;" f
|
42
|
+
Init_term_info terminfo.c /^Init_term_info(void)$/;" f
|
43
|
+
Init_term_infos_reader term_infos_reader.c /^Init_term_infos_reader(void)$/;" f
|
44
|
+
Init_token token.c /^Init_token(void)$/;" f
|
35
45
|
LDSHARED Makefile /^LDSHARED = $(CC) -shared$/;" m
|
36
46
|
LIBPATH Makefile /^LIBPATH = -L"$(libdir)"$/;" m
|
37
47
|
LIBRUBY Makefile /^LIBRUBY = $(LIBRUBY_SO)$/;" m
|
@@ -41,7 +51,7 @@ LIBRUBY_A Makefile /^LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a$/;" m
|
|
41
51
|
LIBS Makefile /^LIBS = $(LIBRUBYARG_SHARED) -lpthread -ldl -lcrypt -lm -lc$/;" m
|
42
52
|
LOCAL_LIBS Makefile /^LOCAL_LIBS = $/;" m
|
43
53
|
MAKEDIRS Makefile /^MAKEDIRS = mkdir -p$/;" m
|
44
|
-
OBJS Makefile /^OBJS = index_io.o term_buffer.o ram_directory.o priority_queue.o string_helper.o segment_merge_queue.o ferret.o term.o util.o$/;" m
|
54
|
+
OBJS Makefile /^OBJS = index_io.o term_buffer.o ram_directory.o priority_queue.o string_helper.o segment_merge_queue.o ferret.o term.o util.o token.o segment_term_enum.o terminfo.o term_infos_reader.o similarity.o$/;" m
|
45
55
|
PriorityQueue ferret.h /^typedef struct PriorityQueue {$/;" s
|
46
56
|
PriorityQueue ferret.h /^} PriorityQueue;$/;" t
|
47
57
|
RAMFile ferret.h /^typedef struct RAMFile {$/;" s
|
@@ -54,64 +64,77 @@ RUBYLIBDIR Makefile /^RUBYLIBDIR = $(sitelibdir)$(target_prefix)$/;" m
|
|
54
64
|
RUBY_INSTALL_NAME Makefile /^RUBY_INSTALL_NAME = ruby1.8$/;" m
|
55
65
|
RUBY_SO_NAME Makefile /^RUBY_SO_NAME = ruby1.8$/;" m
|
56
66
|
SHELL Makefile /^SHELL = \/bin\/sh$/;" m
|
57
|
-
SRCS Makefile /^SRCS = index_io.c term_buffer.c ram_directory.c priority_queue.c string_helper.c segment_merge_queue.c ferret.c term.c util.c$/;" m
|
67
|
+
SRCS Makefile /^SRCS = index_io.c term_buffer.c ram_directory.c priority_queue.c string_helper.c segment_merge_queue.c ferret.c term.c util.c token.c segment_term_enum.c terminfo.c term_infos_reader.c similarity.c$/;" m
|
58
68
|
STATIC_LIB Makefile /^STATIC_LIB = $/;" m
|
59
|
-
|
69
|
+
SegmentTermEnum ferret.h /^typedef struct SegmentTermEnum {$/;" s
|
70
|
+
SegmentTermEnum ferret.h /^} SegmentTermEnum;$/;" t
|
71
|
+
TARGET Makefile /^TARGET = ferret_ext$/;" m
|
60
72
|
TARGET_SO Makefile /^TARGET_SO = $(DLLIB)$/;" m
|
61
73
|
Term ferret.h /^typedef struct Term {$/;" s
|
62
74
|
Term ferret.h /^} Term;$/;" t
|
63
|
-
|
64
|
-
|
75
|
+
TermInfo ferret.h /^typedef struct TermInfo {$/;" s
|
76
|
+
TermInfo ferret.h /^} TermInfo;$/;" t
|
65
77
|
VPATH Makefile /^VPATH = $(srcdir):$(topdir):$(hdrdir)$/;" m
|
66
78
|
__FERRET_H_ ferret.h 2;" d
|
67
79
|
arch Makefile /^arch = i486-linux$/;" m
|
68
80
|
archdir Makefile /^archdir = $(rubylibdir)\/$(arch)$/;" m
|
69
81
|
bindir Makefile /^bindir = $(exec_prefix)\/bin$/;" m
|
82
|
+
buf ferret.h /^ IndexBuffer *buf;$/;" m struct:SegmentTermEnum
|
70
83
|
bufcnt ferret.h /^ int bufcnt;$/;" m struct:RAMFile
|
71
84
|
buffer ferret.h /^ byte_t *buffer;$/;" m struct:IndexBuffer
|
72
85
|
buffers ferret.h /^ void **buffers;$/;" m struct:RAMFile
|
73
86
|
byte_t ferret.h /^typedef unsigned char byte_t;$/;" t
|
74
|
-
cBufferedIndexIn ferret.
|
75
|
-
cBufferedIndexOut ferret.
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
+
cBufferedIndexIn ferret.c /^VALUE cBufferedIndexIn;$/;" v
|
88
|
+
cBufferedIndexOut ferret.c /^VALUE cBufferedIndexOut;$/;" v
|
89
|
+
cDefaultSimilarity ferret.c /^VALUE cDefaultSimilarity;$/;" v
|
90
|
+
cFSIndexIn ferret.c /^VALUE cFSIndexIn;$/;" v
|
91
|
+
cFSIndexOut ferret.c /^VALUE cFSIndexOut;$/;" v
|
92
|
+
cIndexIn ferret.c /^VALUE cIndexIn;$/;" v
|
93
|
+
cIndexOut ferret.c /^VALUE cIndexOut;$/;" v
|
94
|
+
cPriorityQueue ferret.c /^VALUE cPriorityQueue;$/;" v
|
95
|
+
cRAMDirectory ferret.c /^VALUE cRAMDirectory;$/;" v
|
96
|
+
cRAMIndexIn ferret.c /^VALUE cRAMIndexIn;$/;" v
|
97
|
+
cRAMIndexOut ferret.c /^VALUE cRAMIndexOut;$/;" v
|
98
|
+
cSegmentMergeQueue ferret.c /^VALUE cSegmentMergeQueue;$/;" v
|
99
|
+
cSegmentTermEnum ferret.c /^VALUE cSegmentTermEnum;$/;" v
|
100
|
+
cSimilarity ferret.c /^VALUE cSimilarity;$/;" v
|
101
|
+
cTerm ferret.c /^VALUE cTerm;$/;" v
|
102
|
+
cTermBuffer ferret.c /^VALUE cTermBuffer;$/;" v
|
103
|
+
cTermEnum ferret.c /^VALUE cTermEnum;$/;" v
|
104
|
+
cTermInfo ferret.c /^VALUE cTermInfo;$/;" v
|
105
|
+
cTermInfosReader ferret.c /^VALUE cTermInfosReader;$/;" v
|
106
|
+
cToken ferret.c /^VALUE cToken;$/;" v
|
87
107
|
datadir Makefile /^datadir = $(prefix)\/share$/;" m
|
88
|
-
|
108
|
+
doc_freq ferret.h /^ int doc_freq;$/;" m struct:TermInfo
|
89
109
|
exec_prefix Makefile /^exec_prefix = $(prefix)$/;" m
|
90
110
|
extout Makefile /^extout = $/;" m
|
91
111
|
extout_prefix Makefile /^extout_prefix = $/;" m
|
92
|
-
field ferret.h /^
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
112
|
+
field ferret.h /^ VALUE field;$/;" m struct:Term
|
113
|
+
field_infos ferret.h /^ VALUE field_infos;$/;" m struct:SegmentTermEnum
|
114
|
+
flush ram_directory.c /^ID flush, seek, id_file, id_pointer;$/;" v
|
115
|
+
format ferret.h /^ int format;$/;" m struct:SegmentTermEnum
|
116
|
+
format_m1skip_interval ferret.h /^ int format_m1skip_interval;$/;" m struct:SegmentTermEnum
|
117
|
+
freq_pointer ferret.h /^ long freq_pointer;$/;" m struct:TermInfo
|
118
|
+
frt_dsim_idf similarity.c /^frt_dsim_idf(VALUE self, VALUE rdoc_freq, VALUE rnum_docs)$/;" f file:
|
119
|
+
frt_dsim_tf similarity.c /^frt_dsim_tf(VALUE self, VALUE freq)$/;" f file:
|
98
120
|
frt_extend_buffer_if_necessary ram_directory.c /^frt_extend_buffer_if_necessary(RAMFile *rf, int bufnum)$/;" f
|
99
121
|
frt_flush_buffer index_io.c /^ID frt_length, frt_flush_buffer, frt_read_internal, frt_seek_internal; $/;" v
|
100
122
|
frt_hash util.c /^frt_hash(register char *p, register int len)$/;" f
|
123
|
+
frt_id_index_terms term_infos_reader.c /^static ID frt_id_index_terms;$/;" v file:
|
101
124
|
frt_indexbuffer_alloc index_io.c /^frt_indexbuffer_alloc(VALUE klass)$/;" f file:
|
102
125
|
frt_indexbuffer_free index_io.c /^frt_indexbuffer_free(void *p)$/;" f
|
103
126
|
frt_indexin_init_copy index_io.c /^frt_indexin_init_copy(VALUE self, VALUE orig)$/;" f file:
|
104
127
|
frt_indexin_pos index_io.c /^frt_indexin_pos(VALUE self)$/;" f file:
|
105
128
|
frt_indexin_read_byte index_io.c /^frt_indexin_read_byte(VALUE self)$/;" f file:
|
106
129
|
frt_indexin_read_bytes index_io.c /^frt_indexin_read_bytes(VALUE self, VALUE rbuf, VALUE roffset, VALUE rlen)$/;" f file:
|
107
|
-
frt_indexin_read_int index_io.c /^frt_indexin_read_int(VALUE self)$/;" f
|
108
|
-
frt_indexin_read_long index_io.c /^frt_indexin_read_long(VALUE self)$/;" f
|
130
|
+
frt_indexin_read_int index_io.c /^frt_indexin_read_int(VALUE self)$/;" f
|
131
|
+
frt_indexin_read_long index_io.c /^frt_indexin_read_long(VALUE self)$/;" f
|
109
132
|
frt_indexin_read_string index_io.c /^frt_indexin_read_string(VALUE self)$/;" f file:
|
110
133
|
frt_indexin_read_uint index_io.c /^frt_indexin_read_uint(VALUE self)$/;" f file:
|
111
134
|
frt_indexin_read_ulong index_io.c /^frt_indexin_read_ulong(VALUE self)$/;" f file:
|
112
135
|
frt_indexin_read_vint index_io.c /^frt_indexin_read_vint(VALUE self)$/;" f file:
|
113
136
|
frt_indexin_refill index_io.c /^frt_indexin_refill(VALUE self)$/;" f file:
|
114
|
-
frt_indexin_seek index_io.c /^frt_indexin_seek(VALUE self, VALUE rpos)$/;" f
|
137
|
+
frt_indexin_seek index_io.c /^frt_indexin_seek(VALUE self, VALUE rpos)$/;" f
|
115
138
|
frt_indexout_flush index_io.c /^frt_indexout_flush(VALUE self)$/;" f file:
|
116
139
|
frt_indexout_pos index_io.c /^frt_indexout_pos(VALUE self)$/;" f file:
|
117
140
|
frt_indexout_seek index_io.c /^frt_indexout_seek(VALUE self, VALUE pos)$/;" f file:
|
@@ -125,7 +148,6 @@ frt_indexout_write_uint index_io.c /^frt_indexout_write_uint(VALUE self, VALUE r
|
|
125
148
|
frt_indexout_write_ulong index_io.c /^frt_indexout_write_ulong(VALUE self, VALUE rulong)$/;" f file:
|
126
149
|
frt_indexout_write_vint index_io.c /^frt_indexout_write_vint(VALUE self, VALUE rulong)$/;" f file:
|
127
150
|
frt_length index_io.c /^ID frt_length, frt_flush_buffer, frt_read_internal, frt_seek_internal; $/;" v
|
128
|
-
frt_newobj ferret.h /^ID frt_newobj;$/;" v
|
129
151
|
frt_priq_adjust_top priority_queue.c /^frt_priq_adjust_top(VALUE self)$/;" f file:
|
130
152
|
frt_priq_alloc priority_queue.c /^frt_priq_alloc(VALUE klass)$/;" f file:
|
131
153
|
frt_priq_clear priority_queue.c /^frt_priq_clear(VALUE self)$/;" f file:
|
@@ -136,11 +158,11 @@ frt_priq_pop priority_queue.c /^frt_priq_pop(VALUE self)$/;" f file:
|
|
136
158
|
frt_priq_push priority_queue.c /^frt_priq_push(VALUE self, VALUE e)$/;" f file:
|
137
159
|
frt_priq_size priority_queue.c /^frt_priq_size(VALUE self)$/;" f file:
|
138
160
|
frt_priq_top priority_queue.c /^frt_priq_top(VALUE self)$/;" f file:
|
139
|
-
frt_read_byte index_io.c /^frt_read_byte(VALUE self)$/;" f
|
161
|
+
frt_read_byte index_io.c /^frt_read_byte(VALUE self, IndexBuffer *my_buf)$/;" f file:
|
140
162
|
frt_read_bytes index_io.c /^frt_read_bytes(VALUE self, VALUE rbuffer, int offset, int len)$/;" f file:
|
141
163
|
frt_read_chars index_io.c /^frt_read_chars(VALUE self, char* buffer, int off, int len) $/;" f
|
142
164
|
frt_read_internal index_io.c /^ID frt_length, frt_flush_buffer, frt_read_internal, frt_seek_internal; $/;" v
|
143
|
-
frt_read_vint index_io.c /^frt_read_vint(VALUE self)$/;" f
|
165
|
+
frt_read_vint index_io.c /^frt_read_vint(VALUE self, IndexBuffer *my_buf)$/;" f
|
144
166
|
frt_rf_alloc ram_directory.c /^frt_rf_alloc(VALUE klass)$/;" f file:
|
145
167
|
frt_rf_extend ram_directory.c /^frt_rf_extend(RAMFile *rf)$/;" f
|
146
168
|
frt_rf_free ram_directory.c /^frt_rf_free(void *p)$/;" f
|
@@ -162,38 +184,111 @@ frt_seek_internal index_io.c /^ID frt_length, frt_flush_buffer, frt_read_interna
|
|
162
184
|
frt_sh_string_difference string_helper.c /^frt_sh_string_difference(VALUE self, VALUE rstr1, VALUE rstr2)$/;" f file:
|
163
185
|
frt_sh_string_difference_int string_helper.c /^frt_sh_string_difference_int(VALUE self, VALUE rstr1, VALUE rstr2)$/;" f
|
164
186
|
frt_smq_less_than segment_merge_queue.c /^frt_smq_less_than(VALUE self, VALUE rsti1, VALUE rsti2)$/;" f file:
|
187
|
+
frt_ste_alloc segment_term_enum.c /^frt_ste_alloc(VALUE klass)$/;" f file:
|
188
|
+
frt_ste_close segment_term_enum.c /^frt_ste_close(VALUE self)$/;" f file:
|
189
|
+
frt_ste_free segment_term_enum.c /^frt_ste_free(void *p)$/;" f
|
190
|
+
frt_ste_get_doc_freq segment_term_enum.c /^frt_ste_get_doc_freq(VALUE self)$/;" f file:
|
191
|
+
frt_ste_get_field_infos segment_term_enum.c /^frt_ste_get_field_infos(VALUE self)$/;" f file:
|
192
|
+
frt_ste_get_freq_pointer segment_term_enum.c /^frt_ste_get_freq_pointer(VALUE self)$/;" f file:
|
193
|
+
frt_ste_get_index_interval segment_term_enum.c /^frt_ste_get_index_interval(VALUE self)$/;" f file:
|
194
|
+
frt_ste_get_index_pointer segment_term_enum.c /^frt_ste_get_index_pointer(VALUE self)$/;" f file:
|
195
|
+
frt_ste_get_position segment_term_enum.c /^frt_ste_get_position(VALUE self)$/;" f file:
|
196
|
+
frt_ste_get_prev segment_term_enum.c /^frt_ste_get_prev(VALUE self)$/;" f file:
|
197
|
+
frt_ste_get_prox_pointer segment_term_enum.c /^frt_ste_get_prox_pointer(VALUE self)$/;" f file:
|
198
|
+
frt_ste_get_size segment_term_enum.c /^frt_ste_get_size(VALUE self)$/;" f file:
|
199
|
+
frt_ste_get_skip_interval segment_term_enum.c /^frt_ste_get_skip_interval(VALUE self)$/;" f file:
|
200
|
+
frt_ste_get_term segment_term_enum.c /^frt_ste_get_term(VALUE self)$/;" f file:
|
201
|
+
frt_ste_get_term_buffer segment_term_enum.c /^frt_ste_get_term_buffer(VALUE self)$/;" f file:
|
202
|
+
frt_ste_get_term_info segment_term_enum.c /^frt_ste_get_term_info(VALUE self)$/;" f file:
|
203
|
+
frt_ste_init segment_term_enum.c /^frt_ste_init(VALUE self, VALUE input, VALUE field_infos, VALUE is_index)$/;" f file:
|
204
|
+
frt_ste_init_copy segment_term_enum.c /^frt_ste_init_copy(VALUE self, VALUE rother)$/;" f file:
|
205
|
+
frt_ste_mark segment_term_enum.c /^frt_ste_mark(void *p)$/;" f
|
206
|
+
frt_ste_next segment_term_enum.c /^frt_ste_next(VALUE self)$/;" f file:
|
207
|
+
frt_ste_scan_to segment_term_enum.c /^frt_ste_scan_to(VALUE self, VALUE rterm)$/;" f file:
|
208
|
+
frt_ste_seek segment_term_enum.c /^frt_ste_seek(VALUE self, VALUE pointer, VALUE position, VALUE term, VALUE term_info)$/;" f file:
|
209
|
+
frt_ste_set_term_info segment_term_enum.c /^frt_ste_set_term_info(VALUE self, VALUE rti)$/;" f file:
|
165
210
|
frt_term_alloc term.c /^frt_term_alloc(VALUE klass)$/;" f file:
|
211
|
+
frt_term_cmp term.c /^frt_term_cmp(Term *t1, Term *t2)$/;" f
|
166
212
|
frt_term_compare_to term.c /^frt_term_compare_to(VALUE self, VALUE other)$/;" f file:
|
167
213
|
frt_term_compare_to_int term.c /^frt_term_compare_to_int(VALUE self, VALUE rother)$/;" f
|
214
|
+
frt_term_eq term.c /^frt_term_eq(VALUE self, VALUE rother)$/;" f
|
168
215
|
frt_term_free term.c /^frt_term_free(void *p)$/;" f
|
216
|
+
frt_term_ge term.c /^frt_term_ge(VALUE self, VALUE rother)$/;" f
|
169
217
|
frt_term_get_field term.c /^frt_term_get_field(VALUE self)$/;" f file:
|
170
218
|
frt_term_get_text term.c /^frt_term_get_text(VALUE self)$/;" f file:
|
219
|
+
frt_term_gt term.c /^frt_term_gt(VALUE self, VALUE rother)$/;" f
|
171
220
|
frt_term_hash term.c /^frt_term_hash(VALUE self)$/;" f file:
|
172
221
|
frt_term_init term.c /^frt_term_init(VALUE self, VALUE rfield, VALUE rtext)$/;" f file:
|
222
|
+
frt_term_le term.c /^frt_term_le(VALUE self, VALUE rother)$/;" f
|
223
|
+
frt_term_lt term.c /^frt_term_lt(VALUE self, VALUE rother)$/;" f
|
224
|
+
frt_term_mark term.c /^frt_term_mark(void *p)$/;" f
|
173
225
|
frt_term_set term.c /^frt_term_set(VALUE self, VALUE rfield, VALUE rtext)$/;" f
|
226
|
+
frt_term_set_field term.c /^frt_term_set_field(VALUE self, VALUE rfield)$/;" f file:
|
227
|
+
frt_term_set_text term.c /^frt_term_set_text(VALUE self, VALUE rtext)$/;" f file:
|
174
228
|
frt_term_to_s term.c /^frt_term_to_s(VALUE self)$/;" f
|
175
229
|
frt_termbuffer_alloc term_buffer.c /^frt_termbuffer_alloc(VALUE klass)$/;" f file:
|
176
230
|
frt_termbuffer_compare_to term_buffer.c /^frt_termbuffer_compare_to(VALUE self, VALUE rother)$/;" f file:
|
177
231
|
frt_termbuffer_compare_to_int term_buffer.c /^frt_termbuffer_compare_to_int(VALUE self, VALUE rother)$/;" f
|
232
|
+
frt_termbuffer_eq term_buffer.c /^frt_termbuffer_eq(VALUE self, VALUE rother)$/;" f
|
178
233
|
frt_termbuffer_free term_buffer.c /^frt_termbuffer_free(void *p)$/;" f
|
234
|
+
frt_termbuffer_ge term_buffer.c /^frt_termbuffer_ge(VALUE self, VALUE rother)$/;" f
|
179
235
|
frt_termbuffer_get_field_name term_buffer.c /^frt_termbuffer_get_field_name(VALUE self)$/;" f file:
|
180
236
|
frt_termbuffer_get_text term_buffer.c /^frt_termbuffer_get_text(VALUE self)$/;" f file:
|
181
237
|
frt_termbuffer_get_text_length term_buffer.c /^frt_termbuffer_get_text_length(VALUE self)$/;" f file:
|
238
|
+
frt_termbuffer_gt term_buffer.c /^frt_termbuffer_gt(VALUE self, VALUE rother)$/;" f
|
182
239
|
frt_termbuffer_hash term_buffer.c /^frt_termbuffer_hash(VALUE self)$/;" f file:
|
183
240
|
frt_termbuffer_init term_buffer.c /^frt_termbuffer_init(VALUE self)$/;" f file:
|
184
|
-
frt_termbuffer_init_copy term_buffer.c /^frt_termbuffer_init_copy(VALUE self, VALUE rother)$/;" f
|
185
|
-
|
241
|
+
frt_termbuffer_init_copy term_buffer.c /^frt_termbuffer_init_copy(VALUE self, VALUE rother)$/;" f
|
242
|
+
frt_termbuffer_le term_buffer.c /^frt_termbuffer_le(VALUE self, VALUE rother)$/;" f
|
243
|
+
frt_termbuffer_lt term_buffer.c /^frt_termbuffer_lt(VALUE self, VALUE rother)$/;" f
|
244
|
+
frt_termbuffer_mark term_buffer.c /^frt_termbuffer_mark(void *p)$/;" f
|
245
|
+
frt_termbuffer_read term_buffer.c /^frt_termbuffer_read(VALUE self, VALUE rinput, VALUE rfield_infos)$/;" f
|
186
246
|
frt_termbuffer_reset term_buffer.c /^frt_termbuffer_reset(VALUE self)$/;" f file:
|
187
|
-
|
188
|
-
|
247
|
+
frt_termbuffer_to_term term_buffer.c /^frt_termbuffer_to_term(VALUE self)$/;" f
|
248
|
+
frt_ti_alloc terminfo.c /^frt_ti_alloc(VALUE klass)$/;" f file:
|
249
|
+
frt_ti_eql terminfo.c /^frt_ti_eql(VALUE self, VALUE rother)$/;" f file:
|
250
|
+
frt_ti_free terminfo.c /^frt_ti_free(void *p)$/;" f
|
251
|
+
frt_ti_get_df terminfo.c /^frt_ti_get_df(VALUE self)$/;" f file:
|
252
|
+
frt_ti_get_fp terminfo.c /^frt_ti_get_fp(VALUE self)$/;" f file:
|
253
|
+
frt_ti_get_pp terminfo.c /^frt_ti_get_pp(VALUE self)$/;" f file:
|
254
|
+
frt_ti_get_so terminfo.c /^frt_ti_get_so(VALUE self)$/;" f file:
|
255
|
+
frt_ti_init terminfo.c /^frt_ti_init(int argc, VALUE *argv, VALUE self)$/;" f file:
|
256
|
+
frt_ti_init_copy terminfo.c /^frt_ti_init_copy(VALUE self, VALUE rother)$/;" f file:
|
257
|
+
frt_ti_set terminfo.c /^frt_ti_set(int argc, VALUE *argv, VALUE self)$/;" f
|
258
|
+
frt_ti_set_df terminfo.c /^frt_ti_set_df(VALUE self, VALUE val)$/;" f file:
|
259
|
+
frt_ti_set_fp terminfo.c /^frt_ti_set_fp(VALUE self, VALUE val)$/;" f file:
|
260
|
+
frt_ti_set_pp terminfo.c /^frt_ti_set_pp(VALUE self, VALUE val)$/;" f file:
|
261
|
+
frt_ti_set_so terminfo.c /^frt_ti_set_so(VALUE self, VALUE val)$/;" f file:
|
262
|
+
frt_tir_get_index_offset term_infos_reader.c /^frt_tir_get_index_offset(VALUE self, VALUE rterm)$/;" f file:
|
263
|
+
frt_token_eql token.c /^frt_token_eql(VALUE self, VALUE other)$/;" f file:
|
264
|
+
frt_token_init token.c /^frt_token_init(int argc, VALUE *argv, VALUE self)$/;" f file:
|
265
|
+
frt_token_pos_inc token.c /^frt_token_pos_inc (VALUE self, VALUE pI)$/;" f file:
|
189
266
|
frt_write_byte index_io.c /^frt_write_byte(VALUE self, byte_t b)$/;" f file:
|
190
267
|
frt_write_bytes index_io.c /^frt_write_bytes(VALUE self, byte_t *buf, int len)$/;" f
|
191
268
|
frt_write_chars index_io.c /^frt_write_chars(VALUE self, VALUE rbuf, int start, int length)$/;" f file:
|
192
269
|
frt_write_vint index_io.c /^frt_write_vint(VALUE self, register unsigned long long i)$/;" f file:
|
193
270
|
hdrdir Makefile /^hdrdir = $(topdir)$/;" m
|
194
271
|
heap ferret.h /^ VALUE *heap;$/;" m struct:PriorityQueue
|
272
|
+
id_close ferret.c /^ID id_close;$/;" v
|
273
|
+
id_field_array term_buffer.c /^ID id_field_array;$/;" v
|
274
|
+
id_field_name term_buffer.c /^ID id_field_name;$/;" v
|
275
|
+
id_file ram_directory.c /^ID flush, seek, id_file, id_pointer;$/;" v
|
276
|
+
id_iv_size ferret.c /^ID id_iv_size;$/;" v
|
277
|
+
id_new ferret.c /^ID id_new;$/;" v
|
278
|
+
id_pointer ram_directory.c /^ID flush, seek, id_file, id_pointer;$/;" v
|
279
|
+
id_size ferret.c /^ID id_size;$/;" v
|
280
|
+
id_tk_end_offset token.c /^ID id_tk_text, id_tk_pos_inc, id_tk_start_offset, id_tk_end_offset, id_tk_type;$/;" v
|
281
|
+
id_tk_pos_inc token.c /^ID id_tk_text, id_tk_pos_inc, id_tk_start_offset, id_tk_end_offset, id_tk_type;$/;" v
|
282
|
+
id_tk_pos_inc_set token.c /^ID id_tk_pos_inc_set;$/;" v
|
283
|
+
id_tk_start_offset token.c /^ID id_tk_text, id_tk_pos_inc, id_tk_start_offset, id_tk_end_offset, id_tk_type;$/;" v
|
284
|
+
id_tk_text token.c /^ID id_tk_text, id_tk_pos_inc, id_tk_start_offset, id_tk_end_offset, id_tk_type;$/;" v
|
285
|
+
id_tk_type token.c /^ID id_tk_text, id_tk_pos_inc, id_tk_start_offset, id_tk_end_offset, id_tk_type;$/;" v
|
195
286
|
includedir Makefile /^includedir = $(prefix)\/include$/;" m
|
287
|
+
index_interval ferret.h /^ int index_interval;$/;" m struct:SegmentTermEnum
|
288
|
+
index_pointer ferret.h /^ int index_pointer;$/;" m struct:SegmentTermEnum
|
196
289
|
infodir Makefile /^infodir = $(prefix)\/info$/;" m
|
290
|
+
input ferret.h /^ VALUE input;$/;" m struct:SegmentTermEnum
|
291
|
+
is_index ferret.h /^ int is_index;$/;" m struct:SegmentTermEnum
|
197
292
|
len ferret.h /^ int len;$/;" m struct:PriorityQueue
|
198
293
|
len ferret.h /^ int len;$/;" m struct:IndexBuffer
|
199
294
|
length ferret.h /^ int length;$/;" m struct:RAMFile
|
@@ -202,39 +297,48 @@ libdir Makefile /^libdir = $(exec_prefix)\/lib$/;" m
|
|
202
297
|
libexecdir Makefile /^libexecdir = $(exec_prefix)\/libexec$/;" m
|
203
298
|
libpath Makefile /^libpath = $(libdir)$/;" m
|
204
299
|
localstatedir Makefile /^localstatedir = $(DESTDIR)\/var$/;" m
|
205
|
-
|
206
|
-
mFerret ferret.
|
207
|
-
mIndex ferret.
|
208
|
-
|
209
|
-
|
210
|
-
|
300
|
+
mAnalysis ferret.c /^VALUE mAnalysis;$/;" v
|
301
|
+
mFerret ferret.c /^VALUE mFerret;$/;" v
|
302
|
+
mIndex ferret.c /^VALUE mIndex;$/;" v
|
303
|
+
mSearch ferret.c /^VALUE mSearch;$/;" v
|
304
|
+
mStore ferret.c /^VALUE mStore;$/;" v
|
305
|
+
mStringHelper ferret.c /^VALUE mStringHelper;$/;" v
|
306
|
+
mUtils ferret.c /^VALUE mUtils;$/;" v
|
211
307
|
mandir Makefile /^mandir = $(datadir)\/man$/;" m
|
212
308
|
mtime ferret.h /^ VALUE mtime;$/;" m struct:RAMFile
|
213
309
|
name ferret.h /^ char *name;$/;" m struct:RAMFile
|
214
310
|
oldincludedir Makefile /^oldincludedir = $(DESTDIR)\/usr\/include$/;" m
|
215
311
|
pos ferret.h /^ int pos;$/;" m struct:IndexBuffer
|
312
|
+
position ferret.h /^ int position;$/;" m struct:SegmentTermEnum
|
216
313
|
prefix Makefile /^prefix = $(DESTDIR)\/usr$/;" m
|
217
314
|
preload Makefile /^preload = $/;" m
|
218
315
|
priq_down priority_queue.c /^priq_down(PriorityQueue *priq, VALUE self, VALUE rary)$/;" f
|
219
316
|
priq_up priority_queue.c /^priq_up(PriorityQueue *priq, VALUE self, VALUE rary)$/;" f
|
317
|
+
prox_pointer ferret.h /^ long prox_pointer;$/;" m struct:TermInfo
|
220
318
|
put_heap priority_queue.c /^ID less_than, put_heap;$/;" v
|
319
|
+
rtb_curr ferret.h /^ VALUE rtb_curr;$/;" m struct:SegmentTermEnum
|
320
|
+
rtb_prev ferret.h /^ VALUE rtb_prev;$/;" m struct:SegmentTermEnum
|
221
321
|
ruby Makefile /^ruby = \/usr\/bin\/ruby1.8$/;" m
|
222
322
|
ruby_version Makefile /^ruby_version = 1.8$/;" m
|
223
323
|
rubylibdir Makefile /^rubylibdir = $(libdir)\/ruby\/$(ruby_version)$/;" m
|
224
324
|
sbindir Makefile /^sbindir = $(exec_prefix)\/sbin$/;" m
|
225
|
-
seek ram_directory.c /^ID flush, seek;$/;" v
|
325
|
+
seek ram_directory.c /^ID flush, seek, id_file, id_pointer;$/;" v
|
226
326
|
sharedstatedir Makefile /^sharedstatedir = $(prefix)\/com$/;" m
|
227
327
|
sitearch Makefile /^sitearch = i486-linux$/;" m
|
228
328
|
sitearchdir Makefile /^sitearchdir = $(sitelibdir)\/$(sitearch)$/;" m
|
229
329
|
sitedir Makefile /^sitedir = $(DESTDIR)\/usr\/local\/lib\/site_ruby$/;" m
|
230
330
|
sitelibdir Makefile /^sitelibdir = $(sitedir)\/$(ruby_version)$/;" m
|
231
331
|
size ferret.h /^ int size;$/;" m struct:PriorityQueue
|
332
|
+
size ferret.h /^ int size;$/;" m struct:SegmentTermEnum
|
333
|
+
skip_interval ferret.h /^ int skip_interval;$/;" m struct:SegmentTermEnum
|
334
|
+
skip_offset ferret.h /^ int skip_offset;$/;" m struct:TermInfo
|
232
335
|
srcdir Makefile /^srcdir = .$/;" m
|
233
336
|
start ferret.h /^ long start;$/;" m struct:IndexBuffer
|
234
337
|
sysconfdir Makefile /^sysconfdir = $(DESTDIR)\/etc$/;" m
|
235
|
-
target_prefix Makefile /^target_prefix =
|
338
|
+
target_prefix Makefile /^target_prefix = $/;" m
|
339
|
+
tb_curr ferret.h /^ Term *tb_curr;$/;" m struct:SegmentTermEnum
|
340
|
+
tb_prev ferret.h /^ Term *tb_prev;$/;" m struct:SegmentTermEnum
|
236
341
|
text ferret.h /^ char *text;$/;" m struct:Term
|
237
|
-
|
342
|
+
ti ferret.h /^ TermInfo *ti;$/;" m struct:SegmentTermEnum
|
238
343
|
tlen ferret.h /^ int tlen;$/;" m struct:Term
|
239
|
-
tlen ferret.h /^ int tlen;$/;" m struct:TermBuffer
|
240
344
|
topdir Makefile /^topdir = \/usr\/lib\/ruby\/1.8\/i486-linux$/;" m
|