isomorfeus-ferret 0.13.8 → 0.13.11
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/ext/isomorfeus_ferret_ext/bm_store.c +3 -3
- data/ext/isomorfeus_ferret_ext/bzlib.h +83 -82
- data/ext/isomorfeus_ferret_ext/frb_index.c +17 -23
- data/ext/isomorfeus_ferret_ext/frb_search.c +1 -4
- data/ext/isomorfeus_ferret_ext/frb_store.c +32 -34
- data/ext/isomorfeus_ferret_ext/frt_analysis.c +4 -4
- data/ext/isomorfeus_ferret_ext/frt_analysis.h +9 -9
- data/ext/isomorfeus_ferret_ext/frt_bitvector.c +1 -1
- data/ext/isomorfeus_ferret_ext/frt_bitvector.h +1 -1
- data/ext/isomorfeus_ferret_ext/frt_compound_io.c +41 -66
- data/ext/isomorfeus_ferret_ext/frt_config.h +8 -0
- data/ext/isomorfeus_ferret_ext/frt_except.c +1 -0
- data/ext/isomorfeus_ferret_ext/frt_filter.c +2 -4
- data/ext/isomorfeus_ferret_ext/frt_fs_store.c +24 -19
- data/ext/isomorfeus_ferret_ext/frt_global.c +6 -4
- data/ext/isomorfeus_ferret_ext/frt_global.h +1 -1
- data/ext/isomorfeus_ferret_ext/frt_hash.c +40 -48
- data/ext/isomorfeus_ferret_ext/frt_hash.h +14 -16
- data/ext/isomorfeus_ferret_ext/frt_hashset.c +5 -5
- data/ext/isomorfeus_ferret_ext/frt_ind.c +2 -3
- data/ext/isomorfeus_ferret_ext/frt_index.c +148 -219
- data/ext/isomorfeus_ferret_ext/frt_index.h +31 -31
- data/ext/isomorfeus_ferret_ext/frt_lang.c +1 -4
- data/ext/isomorfeus_ferret_ext/frt_multimapper.c +8 -9
- data/ext/isomorfeus_ferret_ext/frt_multimapper.h +1 -1
- data/ext/isomorfeus_ferret_ext/frt_q_boolean.c +6 -6
- data/ext/isomorfeus_ferret_ext/frt_q_match_all.c +8 -3
- data/ext/isomorfeus_ferret_ext/frt_q_parser.c +1743 -1742
- data/ext/isomorfeus_ferret_ext/frt_q_phrase.c +1 -2
- data/ext/isomorfeus_ferret_ext/frt_q_span.c +11 -10
- data/ext/isomorfeus_ferret_ext/frt_ram_store.c +24 -40
- data/ext/isomorfeus_ferret_ext/frt_search.c +29 -28
- data/ext/isomorfeus_ferret_ext/frt_search.h +18 -19
- data/ext/isomorfeus_ferret_ext/frt_store.c +47 -40
- data/ext/isomorfeus_ferret_ext/frt_store.h +46 -48
- data/ext/isomorfeus_ferret_ext/frt_threading.h +12 -5
- data/ext/isomorfeus_ferret_ext/isomorfeus_ferret.c +4 -3
- data/ext/isomorfeus_ferret_ext/test_1710.c +1 -2
- data/ext/isomorfeus_ferret_ext/test_compound_io.c +8 -8
- data/ext/isomorfeus_ferret_ext/test_fields.c +7 -7
- data/ext/isomorfeus_ferret_ext/test_file_deleter.c +1 -1
- data/ext/isomorfeus_ferret_ext/test_filter.c +4 -3
- data/ext/isomorfeus_ferret_ext/test_fs_store.c +1 -1
- data/ext/isomorfeus_ferret_ext/test_highlighter.c +3 -1
- data/ext/isomorfeus_ferret_ext/test_index.c +61 -61
- data/ext/isomorfeus_ferret_ext/test_q_const_score.c +2 -1
- data/ext/isomorfeus_ferret_ext/test_q_filtered.c +3 -2
- data/ext/isomorfeus_ferret_ext/test_q_fuzzy.c +3 -1
- data/ext/isomorfeus_ferret_ext/test_q_span.c +8 -1
- data/ext/isomorfeus_ferret_ext/test_ram_store.c +4 -4
- data/ext/isomorfeus_ferret_ext/test_search.c +9 -4
- data/ext/isomorfeus_ferret_ext/test_segments.c +4 -3
- data/ext/isomorfeus_ferret_ext/test_sort.c +17 -9
- data/ext/isomorfeus_ferret_ext/test_term.c +4 -2
- data/ext/isomorfeus_ferret_ext/test_term_vectors.c +2 -2
- data/ext/isomorfeus_ferret_ext/test_threading.c +5 -4
- data/lib/isomorfeus/ferret/index/index.rb +8 -3
- data/lib/isomorfeus/ferret/version.rb +1 -1
- metadata +16 -2
@@ -19,9 +19,9 @@ static const char *dummy_int_key = "i";
|
|
19
19
|
static FrtHash *free_hts[MAX_FREE_HASH_TABLES];
|
20
20
|
static int num_free_hts = 0;
|
21
21
|
|
22
|
-
unsigned long
|
22
|
+
unsigned long frt_str_hash(const char *const str)
|
23
23
|
{
|
24
|
-
register unsigned long
|
24
|
+
register unsigned long h = 0;
|
25
25
|
register unsigned char *p = (unsigned char *)str;
|
26
26
|
|
27
27
|
for (; *p; p++) {
|
@@ -30,9 +30,9 @@ unsigned long long frt_str_hash(const char *const str)
|
|
30
30
|
return h;
|
31
31
|
}
|
32
32
|
|
33
|
-
unsigned long
|
33
|
+
unsigned long frt_ptr_hash(const void *const ptr)
|
34
34
|
{
|
35
|
-
return (unsigned long
|
35
|
+
return (unsigned long)ptr;
|
36
36
|
}
|
37
37
|
|
38
38
|
int frt_ptr_eq(const void *q1, const void *q2)
|
@@ -55,7 +55,7 @@ typedef FrtHashEntry *(*lookup_ft)(struct FrtHash *self, register const void *ke
|
|
55
55
|
* @param the hashkey we are looking for
|
56
56
|
*/
|
57
57
|
static FrtHashEntry *frt_h_resize_lookup(FrtHash *self,
|
58
|
-
register const unsigned long
|
58
|
+
register const unsigned long hash)
|
59
59
|
{
|
60
60
|
register unsigned long perturb;
|
61
61
|
register int mask = self->mask;
|
@@ -78,9 +78,8 @@ static FrtHashEntry *frt_h_resize_lookup(FrtHash *self,
|
|
78
78
|
}
|
79
79
|
}
|
80
80
|
|
81
|
-
static FrtHashEntry
|
82
|
-
|
83
|
-
register const unsigned long long hash = (unsigned long long)key;
|
81
|
+
static FrtHashEntry *frt_h_lookup_ptr(FrtHash *self, const void *key) {
|
82
|
+
register const unsigned long hash = (unsigned long)key;
|
84
83
|
register unsigned long perturb;
|
85
84
|
register int mask = self->mask;
|
86
85
|
register FrtHashEntry *he0 = self->table;
|
@@ -88,36 +87,34 @@ static FrtHashEntry *frt_h_lookup_ptr(FrtHash *self, const void *key)
|
|
88
87
|
register FrtHashEntry *he = &he0[i];
|
89
88
|
register FrtHashEntry *freeslot = NULL;
|
90
89
|
|
91
|
-
if (he->key == NULL
|
90
|
+
if (he->key == NULL) {
|
92
91
|
he->hash = hash;
|
93
92
|
return he;
|
94
93
|
}
|
95
|
-
|
96
|
-
|
97
|
-
|
94
|
+
|
95
|
+
if (he->hash == hash) return he;
|
96
|
+
|
97
|
+
if (he->key == dummy_key) freeslot = he;
|
98
98
|
|
99
99
|
for (perturb = hash;; perturb >>= PERTURB_SHIFT) {
|
100
100
|
i = (i << 2) + i + perturb + 1;
|
101
101
|
he = &he0[i & mask];
|
102
|
+
|
102
103
|
if (he->key == NULL) {
|
103
|
-
if (freeslot != NULL)
|
104
|
-
he = freeslot;
|
105
|
-
}
|
104
|
+
if (freeslot != NULL) he = freeslot;
|
106
105
|
he->hash = hash;
|
107
106
|
return he;
|
108
107
|
}
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
if (he->key == dummy_key && freeslot == NULL)
|
113
|
-
freeslot = he;
|
114
|
-
}
|
108
|
+
|
109
|
+
if (he->hash == hash) return he;
|
110
|
+
|
111
|
+
if (he->key == dummy_key && freeslot == NULL) freeslot = he;
|
115
112
|
}
|
113
|
+
return he;
|
116
114
|
}
|
117
115
|
|
118
|
-
FrtHashEntry *frt_h_lookup(FrtHash *self, register const void *key)
|
119
|
-
|
120
|
-
register const unsigned long long hash = self->hash_i(key);
|
116
|
+
FrtHashEntry *frt_h_lookup(FrtHash *self, register const void *key) {
|
117
|
+
register const unsigned long hash = self->hash_i(key);
|
121
118
|
register unsigned long perturb;
|
122
119
|
register int mask = self->mask;
|
123
120
|
register FrtHashEntry *he0 = self->table;
|
@@ -185,7 +182,7 @@ FrtHash *frt_h_new_str(frt_free_ft free_key, frt_free_ft free_value)
|
|
185
182
|
|
186
183
|
FrtHash *frt_h_new_int(frt_free_ft free_value)
|
187
184
|
{
|
188
|
-
FrtHash *self
|
185
|
+
FrtHash *self = frt_h_new_str(NULL, free_value);
|
189
186
|
|
190
187
|
self->lookup_i = &frt_h_lookup_ptr;
|
191
188
|
self->eq_i = NULL;
|
@@ -196,7 +193,7 @@ FrtHash *frt_h_new_int(frt_free_ft free_value)
|
|
196
193
|
|
197
194
|
FrtHash *frt_h_new(frt_hash_ft hash, frt_eq_ft eq, frt_free_ft free_key, frt_free_ft free_value)
|
198
195
|
{
|
199
|
-
FrtHash *self
|
196
|
+
FrtHash *self = frt_h_new_str(free_key, free_value);
|
200
197
|
|
201
198
|
self->lookup_i = &frt_h_lookup;
|
202
199
|
self->eq_i = eq;
|
@@ -228,27 +225,24 @@ void frt_h_clear(FrtHash *self)
|
|
228
225
|
self->fill = 0;
|
229
226
|
}
|
230
227
|
|
231
|
-
void frt_h_destroy(FrtHash *
|
232
|
-
{
|
233
|
-
|
234
|
-
frt_h_clear(self);
|
228
|
+
void frt_h_destroy(FrtHash *hash) {
|
229
|
+
if (FRT_DEREF(hash) == 0) {
|
230
|
+
frt_h_clear(hash);
|
235
231
|
|
236
232
|
/* if a new table was created, be sure to free it */
|
237
|
-
if (
|
238
|
-
free(
|
233
|
+
if (hash->table != hash->smalltable) {
|
234
|
+
free(hash->table);
|
239
235
|
}
|
240
236
|
|
241
237
|
if (num_free_hts < MAX_FREE_HASH_TABLES) {
|
242
|
-
free_hts[num_free_hts++] =
|
243
|
-
}
|
244
|
-
|
245
|
-
free(self);
|
238
|
+
free_hts[num_free_hts++] = hash;
|
239
|
+
} else {
|
240
|
+
free(hash);
|
246
241
|
}
|
247
242
|
}
|
248
243
|
}
|
249
244
|
|
250
|
-
void *frt_h_get(FrtHash *self, const void *key)
|
251
|
-
{
|
245
|
+
void *frt_h_get(FrtHash *self, const void *key) {
|
252
246
|
/* Note: lookup_i will never return NULL. */
|
253
247
|
return self->lookup_i(self, key)->value;
|
254
248
|
}
|
@@ -270,8 +264,7 @@ int frt_h_del(FrtHash *self, const void *key)
|
|
270
264
|
}
|
271
265
|
}
|
272
266
|
|
273
|
-
void *frt_h_rem(FrtHash *self, const void *key, bool destroy_key)
|
274
|
-
{
|
267
|
+
void *frt_h_rem(FrtHash *self, const void *key, bool destroy_key) {
|
275
268
|
void *val;
|
276
269
|
FrtHashEntry *he = self->lookup_i(self, key);
|
277
270
|
|
@@ -285,8 +278,7 @@ void *frt_h_rem(FrtHash *self, const void *key, bool destroy_key)
|
|
285
278
|
he->value = NULL;
|
286
279
|
self->size--;
|
287
280
|
return val;
|
288
|
-
}
|
289
|
-
else {
|
281
|
+
} else {
|
290
282
|
return NULL;
|
291
283
|
}
|
292
284
|
}
|
@@ -405,23 +397,23 @@ FrtHashKeyStatus frt_h_has_key(FrtHash *self, const void *key)
|
|
405
397
|
return FRT_HASH_KEY_EQUAL;
|
406
398
|
}
|
407
399
|
|
408
|
-
void *frt_h_get_int(FrtHash *self, const unsigned long
|
400
|
+
void *frt_h_get_int(FrtHash *self, const unsigned long key)
|
409
401
|
{
|
410
402
|
return frt_h_get(self, (const void *)key);
|
411
403
|
}
|
412
404
|
|
413
|
-
int frt_h_del_int(FrtHash *self, const unsigned long
|
405
|
+
int frt_h_del_int(FrtHash *self, const unsigned long key)
|
414
406
|
{
|
415
407
|
return frt_h_del(self, (const void *)key);
|
416
408
|
}
|
417
409
|
|
418
|
-
void *frt_h_rem_int(FrtHash *self, const unsigned long
|
410
|
+
void *frt_h_rem_int(FrtHash *self, const unsigned long key)
|
419
411
|
{
|
420
412
|
return frt_h_rem(self, (const void *)key, false);
|
421
413
|
}
|
422
414
|
|
423
415
|
FrtHashKeyStatus frt_h_set_int(FrtHash *self,
|
424
|
-
const unsigned long
|
416
|
+
const unsigned long key,
|
425
417
|
void *value)
|
426
418
|
{
|
427
419
|
FrtHashKeyStatus ret_val = FRT_HASH_KEY_DOES_NOT_EXIST;
|
@@ -439,7 +431,7 @@ FrtHashKeyStatus frt_h_set_int(FrtHash *self,
|
|
439
431
|
return ret_val;
|
440
432
|
}
|
441
433
|
|
442
|
-
int frt_h_set_safe_int(FrtHash *self, const unsigned long
|
434
|
+
int frt_h_set_safe_int(FrtHash *self, const unsigned long key, void *value)
|
443
435
|
{
|
444
436
|
FrtHashEntry *he;
|
445
437
|
if (frt_h_set_ext(self, (const void *)key, &he)) {
|
@@ -450,7 +442,7 @@ int frt_h_set_safe_int(FrtHash *self, const unsigned long long key, void *value)
|
|
450
442
|
return false;
|
451
443
|
}
|
452
444
|
|
453
|
-
int frt_h_has_key_int(FrtHash *self, const unsigned long
|
445
|
+
int frt_h_has_key_int(FrtHash *self, const unsigned long key)
|
454
446
|
{
|
455
447
|
return frt_h_has_key(self, (const void *)key);
|
456
448
|
}
|
@@ -25,9 +25,8 @@ typedef enum
|
|
25
25
|
/**
|
26
26
|
* struct used internally to store values in the Hash
|
27
27
|
*/
|
28
|
-
typedef struct
|
29
|
-
|
30
|
-
unsigned long long hash;
|
28
|
+
typedef struct {
|
29
|
+
unsigned long hash;
|
31
30
|
void *key;
|
32
31
|
void *value;
|
33
32
|
} FrtHashEntry;
|
@@ -40,12 +39,11 @@ typedef struct
|
|
40
39
|
* know when to resize. The Hash is resized when more than two thirds of
|
41
40
|
* the Hash is Filled.
|
42
41
|
*/
|
43
|
-
typedef struct FrtHash
|
44
|
-
{
|
42
|
+
typedef struct FrtHash {
|
45
43
|
int fill; /* num Active + num Dummy */
|
46
44
|
int size; /* num Active ie, num keys set */
|
47
45
|
int mask; /* capacity_of_table - 1 */
|
48
|
-
int ref_cnt;
|
46
|
+
_Atomic unsigned int ref_cnt;
|
49
47
|
|
50
48
|
/* table points to smalltable initially. If the table grows beyond 2/3 of
|
51
49
|
* FRT_HASH_MINSIZE it will point to newly malloced memory as it grows. */
|
@@ -60,7 +58,7 @@ typedef struct FrtHash
|
|
60
58
|
* used outside of the Hash methods */
|
61
59
|
FrtHashEntry *(*lookup_i)(struct FrtHash *self,
|
62
60
|
register const void *key);
|
63
|
-
unsigned long
|
61
|
+
unsigned long (*hash_i)(const void *key);
|
64
62
|
int (*eq_i)(const void *key1, const void *key2);
|
65
63
|
void (*free_key_i)(void *p);
|
66
64
|
void (*free_value_i)(void *p);
|
@@ -73,7 +71,7 @@ typedef struct FrtHash
|
|
73
71
|
* @param key object to hash
|
74
72
|
* @return an unsigned 32-bit integer hash value
|
75
73
|
*/
|
76
|
-
typedef unsigned long
|
74
|
+
typedef unsigned long (*frt_hash_ft)(const void *key);
|
77
75
|
|
78
76
|
/**
|
79
77
|
* Equals function type used by Hash. A function of this type must be
|
@@ -87,7 +85,7 @@ typedef int (*frt_eq_ft)(const void *key1, const void *key2);
|
|
87
85
|
* @param str string to hash
|
88
86
|
* @return an unsigned long integer hash value
|
89
87
|
*/
|
90
|
-
extern unsigned long
|
88
|
+
extern unsigned long frt_str_hash(const char *const str);
|
91
89
|
|
92
90
|
/**
|
93
91
|
* Determine a hash value for a pointer. Just cast the pointer to an unsigned
|
@@ -96,7 +94,7 @@ extern unsigned long long frt_str_hash(const char *const str);
|
|
96
94
|
* @param ptr pointer to hash
|
97
95
|
* @return an unsigned long integer hash value
|
98
96
|
*/
|
99
|
-
extern unsigned long
|
97
|
+
extern unsigned long frt_ptr_hash(const void *const ptr);
|
100
98
|
|
101
99
|
/**
|
102
100
|
* Determine if two pointers point to the same point in memory.
|
@@ -320,7 +318,7 @@ extern FrtHashKeyStatus frt_h_has_key(FrtHash *self,
|
|
320
318
|
* @return the value referenced by the key +key+. If there is no value
|
321
319
|
* referenced by that key, NULL is returned.
|
322
320
|
*/
|
323
|
-
extern void *frt_h_get_int(FrtHash *self, const unsigned long
|
321
|
+
extern void *frt_h_get_int(FrtHash *self, const unsigned long key);
|
324
322
|
|
325
323
|
/**
|
326
324
|
* Delete the value in Hash referenced by the integer key +key+. When the
|
@@ -337,7 +335,7 @@ extern void *frt_h_get_int(FrtHash *self, const unsigned long long key);
|
|
337
335
|
* @return true if the object was successfully deleted or false if the key was
|
338
336
|
* not found
|
339
337
|
*/
|
340
|
-
extern int frt_h_del_int(FrtHash *self, const unsigned long
|
338
|
+
extern int frt_h_del_int(FrtHash *self, const unsigned long key);
|
341
339
|
|
342
340
|
/**
|
343
341
|
* Remove the value in Hash referenced by the integer key +key+. When the
|
@@ -351,7 +349,7 @@ extern int frt_h_del_int(FrtHash *self, const unsigned long long key);
|
|
351
349
|
* @param key the integer key to lookup
|
352
350
|
* @return the value referenced by +key+ if it can be found or NULL otherwise
|
353
351
|
*/
|
354
|
-
extern void *frt_h_rem_int(FrtHash *self, const unsigned long
|
352
|
+
extern void *frt_h_rem_int(FrtHash *self, const unsigned long key);
|
355
353
|
|
356
354
|
/**
|
357
355
|
* WARNING: this function may destroy an old value if the key already exists
|
@@ -382,7 +380,7 @@ extern void *frt_h_rem_int(FrtHash *self, const unsigned long long key);
|
|
382
380
|
* </pre>
|
383
381
|
*/
|
384
382
|
extern FrtHashKeyStatus frt_h_set_int(FrtHash *self,
|
385
|
-
const unsigned long
|
383
|
+
const unsigned long key,
|
386
384
|
void *value);
|
387
385
|
|
388
386
|
/**
|
@@ -396,7 +394,7 @@ extern FrtHashKeyStatus frt_h_set_int(FrtHash *self,
|
|
396
394
|
* @return true if the value was successfully added or false otherwise
|
397
395
|
*/
|
398
396
|
extern int frt_h_set_safe_int(FrtHash *self,
|
399
|
-
const unsigned long
|
397
|
+
const unsigned long key,
|
400
398
|
void *value);
|
401
399
|
/**
|
402
400
|
* Check whether integer key +key+ exists in the Hash.
|
@@ -405,7 +403,7 @@ extern int frt_h_set_safe_int(FrtHash *self,
|
|
405
403
|
* @param key the integer key to check for in the Hash
|
406
404
|
* @return true if the key exists in the Hash, false otherwise.
|
407
405
|
*/
|
408
|
-
extern int frt_h_has_key_int(FrtHash *self, const unsigned long
|
406
|
+
extern int frt_h_has_key_int(FrtHash *self, const unsigned long key);
|
409
407
|
|
410
408
|
typedef void (*frt_h_each_key_val_ft)(void *key, void *value, void *arg);
|
411
409
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
/*
|
5
5
|
* The HashSet contains an array +elems+ of the elements that have been added.
|
6
|
-
* It always has +size+ elements so +size+
|
6
|
+
* It always has +size+ elements so +size+ and +elems+ can be used to iterate
|
7
7
|
* over all alements in the HashSet. It also uses a Hash to keep track of
|
8
8
|
* which elements have been added and their index in the +elems+ array.
|
9
9
|
*/
|
@@ -37,7 +37,7 @@ FrtHashSet *frt_hs_new_ptr(frt_free_ft free_func)
|
|
37
37
|
return hs;
|
38
38
|
}
|
39
39
|
|
40
|
-
static void
|
40
|
+
static void hs_clear(FrtHashSet *hs, bool destroy)
|
41
41
|
{
|
42
42
|
FrtHashSetEntry *curr, *next = hs->first;
|
43
43
|
frt_free_ft do_free = destroy ? hs->free_elem_i : &frt_dummy_free;
|
@@ -52,20 +52,20 @@ static void clear(FrtHashSet *hs, bool destroy)
|
|
52
52
|
|
53
53
|
void frt_hs_clear(FrtHashSet *hs)
|
54
54
|
{
|
55
|
-
|
55
|
+
hs_clear(hs, true);
|
56
56
|
frt_h_clear(hs->ht);
|
57
57
|
}
|
58
58
|
|
59
59
|
void frt_hs_free(FrtHashSet *hs)
|
60
60
|
{
|
61
|
-
|
61
|
+
hs_clear(hs, false);
|
62
62
|
frt_h_destroy(hs->ht);
|
63
63
|
free(hs);
|
64
64
|
}
|
65
65
|
|
66
66
|
void frt_hs_destroy(FrtHashSet *hs)
|
67
67
|
{
|
68
|
-
|
68
|
+
hs_clear(hs, true);
|
69
69
|
frt_h_destroy(hs->ht);
|
70
70
|
free(hs);
|
71
71
|
}
|
@@ -40,8 +40,8 @@ FrtIndex *frt_index_new(FrtStore *store, FrtAnalyzer *analyzer, FrtHashSet *def_
|
|
40
40
|
frt_mutex_init(&self->mutex, NULL);
|
41
41
|
self->has_writes = false;
|
42
42
|
if (store) {
|
43
|
-
FRT_REF(store);
|
44
43
|
self->store = store;
|
44
|
+
FRT_REF(store);
|
45
45
|
} else {
|
46
46
|
self->store = frt_open_ram_store(NULL);
|
47
47
|
create = true;
|
@@ -84,14 +84,13 @@ void frt_index_destroy(FrtIndex *self)
|
|
84
84
|
frt_mutex_destroy(&self->mutex);
|
85
85
|
INDEX_CLOSE_READER(self);
|
86
86
|
if (self->iw) frt_iw_close(self->iw);
|
87
|
-
|
87
|
+
frt_store_close(self->store);
|
88
88
|
frt_a_deref(self->analyzer);
|
89
89
|
if (self->qp) frt_qp_destroy(self->qp);
|
90
90
|
if (self->key) frt_hs_destroy(self->key);
|
91
91
|
free(self);
|
92
92
|
}
|
93
93
|
|
94
|
-
|
95
94
|
void frt_ensure_writer_open(FrtIndex *self)
|
96
95
|
{
|
97
96
|
if (!self->iw) {
|